diff --git a/core/tests/epoch_accounts_hash.rs b/core/tests/epoch_accounts_hash.rs index df0d407df7..51809cfb6a 100755 --- a/core/tests/epoch_accounts_hash.rs +++ b/core/tests/epoch_accounts_hash.rs @@ -587,11 +587,7 @@ fn test_epoch_accounts_hash_and_warping() { None, ); // flush the write cache so warping can calculate the accounts hash from storages - bank_forks - .read() - .unwrap() - .working_bank() - .force_flush_accounts_cache(); + bank.force_flush_accounts_cache(); let bank = bank_forks.write().unwrap().insert(Bank::warp_from_parent( &bank, &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_slot_in_next_epoch = 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( &bank, &Pubkey::default(),