run hash calc with index on failure (#27279)
This commit is contained in:
parent
ab0731728a
commit
fc1a4dd11a
|
@ -152,6 +152,26 @@ impl AccountsHashVerifier {
|
|||
if accounts_package.expected_capitalization != lamports {
|
||||
// before we assert, run the hash calc again. This helps track down whether it could have been a failure in a race condition possibly with shrink.
|
||||
// We could add diagnostics to the hash calc here to produce a per bin cap or something to help narrow down how many pubkeys are different.
|
||||
let result_with_index = accounts_package
|
||||
.accounts
|
||||
.accounts_db
|
||||
.calculate_accounts_hash(
|
||||
accounts_package.slot,
|
||||
&CalcAccountsHashConfig {
|
||||
use_bg_thread_pool: false,
|
||||
check_hash: false,
|
||||
ancestors: None,
|
||||
use_write_cache: false,
|
||||
epoch_schedule: &accounts_package.epoch_schedule,
|
||||
rent_collector: &accounts_package.rent_collector,
|
||||
store_detailed_debug_info_on_failure: false,
|
||||
full_snapshot: None,
|
||||
},
|
||||
);
|
||||
info!(
|
||||
"hash calc with index: {}, {:?}",
|
||||
accounts_package.slot, result_with_index
|
||||
);
|
||||
let _ = accounts_package
|
||||
.accounts
|
||||
.accounts_db
|
||||
|
|
|
@ -6156,7 +6156,7 @@ impl AccountsDb {
|
|||
AccountsHash::checked_cast_for_capitalization(balances.map(|b| b as u128).sum::<u128>())
|
||||
}
|
||||
|
||||
fn calculate_accounts_hash(
|
||||
pub fn calculate_accounts_hash(
|
||||
&self,
|
||||
max_slot: Slot,
|
||||
config: &CalcAccountsHashConfig<'_>,
|
||||
|
|
Loading…
Reference in New Issue