when testing hash calc, also verify cap (#25012)

This commit is contained in:
Jeff Washington (jwash) 2022-05-05 15:16:15 -05:00 committed by GitHub
parent a01291069a
commit 96259b4f23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -225,7 +225,7 @@ impl SnapshotRequestHandler {
let use_index_hash_calculation = false;
let check_hash = false;
let (this_hash, _cap) = snapshot_root_bank.accounts().accounts_db.calculate_accounts_hash_helper(
let (this_hash, capitalization) = snapshot_root_bank.accounts().accounts_db.calculate_accounts_hash_helper(
use_index_hash_calculation,
snapshot_root_bank.slot(),
&CalcAccountsHashConfig {
@ -238,6 +238,7 @@ impl SnapshotRequestHandler {
},
).unwrap();
assert_eq!(previous_hash, this_hash);
assert_eq!(capitalization, snapshot_root_bank.capitalization());
Some(this_hash)
} else {
None