hash calculation adds really old slots to dirty_stores (#19434)

This commit is contained in:
Jeff Washington (jwash)
2021-08-26 14:32:43 -05:00
committed by GitHub
parent 7c7640b462
commit 98bc694606
5 changed files with 49 additions and 13 deletions

View File

@@ -108,7 +108,7 @@ impl SnapshotRequestHandler {
let previous_hash = if test_hash_calculation {
// We have to use the index version here.
// We cannot calculate the non-index way because cache has not been flushed and stores don't match reality.
snapshot_root_bank.update_accounts_hash_with_index_option(true, false)
snapshot_root_bank.update_accounts_hash_with_index_option(true, false, None)
} else {
Hash::default()
};
@@ -146,6 +146,7 @@ impl SnapshotRequestHandler {
let this_hash = snapshot_root_bank.update_accounts_hash_with_index_option(
use_index_hash_calculation,
test_hash_calculation,
Some(snapshot_root_bank.epoch_schedule().slots_per_epoch),
);
let hash_for_testing = if test_hash_calculation {
assert_eq!(previous_hash, this_hash);