Test must flush accounts cache before calculating accounts hash from storages (#31752)
This commit is contained in:
parent
d866fce3d8
commit
8da91d8670
|
@ -587,11 +587,7 @@ fn test_epoch_accounts_hash_and_warping() {
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
// flush the write cache so warping can calculate the accounts hash from storages
|
// flush the write cache so warping can calculate the accounts hash from storages
|
||||||
bank_forks
|
bank.force_flush_accounts_cache();
|
||||||
.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(),
|
||||||
|
@ -624,6 +620,8 @@ fn test_epoch_accounts_hash_and_warping() {
|
||||||
let eah_start_offset = epoch_accounts_hash::calculation_offset_start(&bank);
|
let eah_start_offset = epoch_accounts_hash::calculation_offset_start(&bank);
|
||||||
let eah_start_slot_in_next_epoch =
|
let eah_start_slot_in_next_epoch =
|
||||||
epoch_schedule.get_first_slot_in_epoch(bank.epoch() + 1) + eah_start_offset;
|
epoch_schedule.get_first_slot_in_epoch(bank.epoch() + 1) + eah_start_offset;
|
||||||
|
// flush the write cache so warping can calculate the accounts hash from storages
|
||||||
|
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(),
|
||||||
|
|
Loading…
Reference in New Issue