fix race in get_exclusive_storage() and load() (#3941)
* Revert "Revert "account storage is not in sync with the index after gc (#3914)" (#3936)"
This reverts commit 4f47fc00bc
.
* fix get_exclusive_storage
* clippy
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user