account storage is not in sync with the index after gc (#3914)

* account storage is not in sync with the index after gc

* builds

* clippy fmt

* test

* purge dead forks on store

* rm println

* also fixed count_stores

* comments
This commit is contained in:
anatoly yakovenko
2019-04-20 20:50:50 -05:00
committed by GitHub
parent 349e8a9462
commit 101d6b92ee
3 changed files with 206 additions and 151 deletions

View File

@@ -1,6 +1,6 @@
use crate::accounts_db::{
get_paths_vec, AccountInfo, AccountStorageSlice, AccountsDB, ErrorCounters,
InstructionAccounts, InstructionLoaders,
get_paths_vec, AccountInfo, AccountStorage, AccountsDB, ErrorCounters, InstructionAccounts,
InstructionLoaders,
};
use crate::accounts_index::{AccountsIndex, Fork};
use crate::append_vec::StoredAccount;
@@ -140,7 +140,7 @@ impl Accounts {
}
fn load_tx_accounts(
storage: &AccountStorageSlice,
storage: &AccountStorage,
ancestors: &HashMap<Fork, usize>,
accounts_index: &AccountsIndex<AccountInfo>,
tx: &Transaction,
@@ -180,7 +180,7 @@ impl Accounts {
}
fn load_executable_accounts(
storage: &AccountStorageSlice,
storage: &AccountStorage,
ancestors: &HashMap<Fork, usize>,
accounts_index: &AccountsIndex<AccountInfo>,
program_id: &Pubkey,
@@ -222,7 +222,7 @@ impl Accounts {
/// For each program_id in the transaction, load its loaders.
fn load_loaders(
storage: &AccountStorageSlice,
storage: &AccountStorage,
ancestors: &HashMap<Fork, usize>,
accounts_index: &AccountsIndex<AccountInfo>,
tx: &Transaction,