From 784766151138ff0ee4e978d67bbac1c80549f75c Mon Sep 17 00:00:00 2001 From: Brennan Date: Thu, 23 Feb 2023 16:23:18 -0800 Subject: [PATCH] Process tower after warping bank forks (#30467) This helps ensure tower and bank forks are in sync in terms of root slot --- core/src/validator.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/validator.rs b/core/src/validator.rs index 84a2c77eb..4c138b854 100644 --- a/core/src/validator.rs +++ b/core/src/validator.rs @@ -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(()) }