Flushes accounts cache before warping (#30437)

This commit is contained in:
Brooks 2023-02-22 21:13:31 -05:00 committed by GitHub
parent ac7e7aa8f0
commit 69a9520f79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -1709,6 +1709,13 @@ fn maybe_warp_slot(
info!("warping to slot {}", warp_slot);
let root_bank = bank_forks.root_bank();
// An accounts hash calculation from storages will occur in warp_from_parent() below. This
// requires that the accounts cache has been flushed, which requires the parent slot to be
// rooted.
root_bank.squash();
root_bank.force_flush_accounts_cache();
bank_forks.insert(Bank::warp_from_parent(
&root_bank,
&Pubkey::default(),