Process tower after warping bank forks (#30467)

This helps ensure tower and bank forks are in sync in terms of root slot
This commit is contained in:
Brennan 2023-02-23 16:23:18 -08:00 committed by GitHub
parent 005dde70e2
commit 7847661511
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -1693,8 +1693,6 @@ fn maybe_warp_slot(
accounts_background_request_sender: &AbsRequestSender,
) -> Result<(), String> {
if let Some(warp_slot) = config.warp_slot {
process_blockstore.process()?;
let mut bank_forks = bank_forks.write().unwrap();
let working_bank = bank_forks.working_bank();
@ -1750,6 +1748,11 @@ fn maybe_warp_slot(
"created snapshot: {}",
full_snapshot_archive_info.path().display()
);
drop(bank_forks);
// Process blockstore after warping bank forks to make sure tower and
// bank forks are in sync.
process_blockstore.process()?;
}
Ok(())
}