pass stats separately from CalcAccountsHashConfig (#23892)

This commit is contained in:
Jeff Washington (jwash)
2022-03-24 12:48:47 -05:00
committed by GitHub
parent 82328fd9d8
commit 37c36ce3fa
3 changed files with 40 additions and 32 deletions

View File

@ -114,13 +114,15 @@ impl AccountsHashVerifier {
let (hash, lamports) = accounts_package
.accounts
.accounts_db
.calculate_accounts_hash_without_index(&mut CalcAccountsHashConfig {
storages: &sorted_storages,
use_bg_thread_pool: true,
stats: HashStats::default(),
check_hash: false,
ancestors: None,
})
.calculate_accounts_hash_without_index(
&CalcAccountsHashConfig {
storages: &sorted_storages,
use_bg_thread_pool: true,
check_hash: false,
ancestors: None,
},
HashStats::default(),
)
.unwrap();
assert_eq!(accounts_package.expected_capitalization, lamports);