HashCalc uses self.accounts_index (#23888)
This commit is contained in:
parent
396b49a7c1
commit
9d3b17c635
|
@ -981,7 +981,7 @@ struct RemoveUnrootedSlotsSynchronization {
|
||||||
signal: Condvar,
|
signal: Condvar,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub type AccountInfoAccountsIndex = AccountsIndex<AccountInfo>;
|
type AccountInfoAccountsIndex = AccountsIndex<AccountInfo>;
|
||||||
|
|
||||||
// This structure handles the load/store of the accounts
|
// This structure handles the load/store of the accounts
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
@ -5488,7 +5488,7 @@ impl AccountsDb {
|
||||||
) -> Result<(Hash, u64), BankHashVerificationError> {
|
) -> Result<(Hash, u64), BankHashVerificationError> {
|
||||||
if !use_index {
|
if !use_index {
|
||||||
let accounts_cache_and_ancestors = if can_cached_slot_be_unflushed {
|
let accounts_cache_and_ancestors = if can_cached_slot_be_unflushed {
|
||||||
Some((&self.accounts_cache, ancestors, &self.accounts_index))
|
Some((&self.accounts_cache, ancestors))
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
|
@ -5748,7 +5748,9 @@ impl AccountsDb {
|
||||||
PUBKEY_BINS_FOR_CALCULATING_HASHES,
|
PUBKEY_BINS_FOR_CALCULATING_HASHES,
|
||||||
&bounds,
|
&bounds,
|
||||||
config.check_hash,
|
config.check_hash,
|
||||||
config.accounts_cache_and_ancestors,
|
config
|
||||||
|
.accounts_cache_and_ancestors
|
||||||
|
.map(|(a, b)| (a, b, &self.accounts_index)),
|
||||||
hash.filler_account_suffix.as_ref(),
|
hash.filler_account_suffix.as_ref(),
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
use {
|
use {
|
||||||
crate::{
|
crate::{
|
||||||
accounts_cache::AccountsCache,
|
accounts_cache::AccountsCache, accounts_db::SnapshotStorages, ancestors::Ancestors,
|
||||||
accounts_db::{AccountInfoAccountsIndex, SnapshotStorages},
|
|
||||||
ancestors::Ancestors,
|
|
||||||
sorted_storages::SortedStorages,
|
sorted_storages::SortedStorages,
|
||||||
},
|
},
|
||||||
log::*,
|
log::*,
|
||||||
|
@ -30,11 +28,7 @@ pub struct CalcAccountsHashConfig<'a> {
|
||||||
pub use_bg_thread_pool: bool,
|
pub use_bg_thread_pool: bool,
|
||||||
pub stats: HashStats,
|
pub stats: HashStats,
|
||||||
pub check_hash: bool,
|
pub check_hash: bool,
|
||||||
pub accounts_cache_and_ancestors: Option<(
|
pub accounts_cache_and_ancestors: Option<(&'a AccountsCache, &'a Ancestors)>,
|
||||||
&'a AccountsCache,
|
|
||||||
&'a Ancestors,
|
|
||||||
&'a AccountInfoAccountsIndex,
|
|
||||||
)>,
|
|
||||||
// to come soon
|
// to come soon
|
||||||
/*
|
/*
|
||||||
pub rent_collector: RentCollector,
|
pub rent_collector: RentCollector,
|
||||||
|
|
Loading…
Reference in New Issue