Uses Storages to calculate accounts hash in EAH warp tests (#29192)
This commit is contained in:
parent
7b1d00ee80
commit
391f68da61
|
@ -11,7 +11,7 @@ use {
|
||||||
AbsRequestHandlers, AbsRequestSender, AccountsBackgroundService, DroppedSlotsReceiver,
|
AbsRequestHandlers, AbsRequestSender, AccountsBackgroundService, DroppedSlotsReceiver,
|
||||||
PrunedBanksRequestHandler, SnapshotRequestHandler,
|
PrunedBanksRequestHandler, SnapshotRequestHandler,
|
||||||
},
|
},
|
||||||
accounts_db::AccountShrinkThreshold,
|
accounts_db::{AccountShrinkThreshold, CalcAccountsHashDataSource},
|
||||||
accounts_hash::CalcAccountsHashConfig,
|
accounts_hash::CalcAccountsHashConfig,
|
||||||
accounts_index::AccountSecondaryIndexes,
|
accounts_index::AccountSecondaryIndexes,
|
||||||
bank::{Bank, BankTestConfig},
|
bank::{Bank, BankTestConfig},
|
||||||
|
@ -590,11 +590,17 @@ fn test_epoch_accounts_hash_and_warping() {
|
||||||
.accounts_background_request_sender,
|
.accounts_background_request_sender,
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
|
// flush the write cache so warping can calculate the accounts hash from storages
|
||||||
|
bank_forks
|
||||||
|
.read()
|
||||||
|
.unwrap()
|
||||||
|
.working_bank()
|
||||||
|
.force_flush_accounts_cache();
|
||||||
let bank = bank_forks.write().unwrap().insert(Bank::warp_from_parent(
|
let bank = bank_forks.write().unwrap().insert(Bank::warp_from_parent(
|
||||||
&bank,
|
&bank,
|
||||||
&Pubkey::default(),
|
&Pubkey::default(),
|
||||||
eah_stop_slot_in_next_epoch,
|
eah_stop_slot_in_next_epoch,
|
||||||
solana_runtime::accounts_db::CalcAccountsHashDataSource::IndexForTests,
|
CalcAccountsHashDataSource::Storages,
|
||||||
));
|
));
|
||||||
let bank = bank_forks.write().unwrap().insert(Bank::new_from_parent(
|
let bank = bank_forks.write().unwrap().insert(Bank::new_from_parent(
|
||||||
&bank,
|
&bank,
|
||||||
|
@ -626,7 +632,7 @@ fn test_epoch_accounts_hash_and_warping() {
|
||||||
&bank,
|
&bank,
|
||||||
&Pubkey::default(),
|
&Pubkey::default(),
|
||||||
eah_start_slot_in_next_epoch,
|
eah_start_slot_in_next_epoch,
|
||||||
solana_runtime::accounts_db::CalcAccountsHashDataSource::Storages,
|
CalcAccountsHashDataSource::Storages,
|
||||||
));
|
));
|
||||||
let bank = bank_forks.write().unwrap().insert(Bank::new_from_parent(
|
let bank = bank_forks.write().unwrap().insert(Bank::new_from_parent(
|
||||||
&bank,
|
&bank,
|
||||||
|
|
Loading…
Reference in New Issue