From 5150877fb37567d579d5c94bd0f435fa8453620f Mon Sep 17 00:00:00 2001 From: Brennan Watt Date: Thu, 25 Aug 2022 09:29:57 -0700 Subject: [PATCH] Attempt to skip redundant startup account verification (#26999) --- ledger/src/blockstore_processor.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ledger/src/blockstore_processor.rs b/ledger/src/blockstore_processor.rs index de5a542b79a0a5..21755ffbfb9c23 100644 --- a/ledger/src/blockstore_processor.rs +++ b/ledger/src/blockstore_processor.rs @@ -853,12 +853,8 @@ pub fn process_blockstore_from_root( // We might be promptly restarted after bad capitalization was detected while creating newer snapshot. // In that case, we're most likely restored from the last good snapshot and replayed up to this root. // So again check here for the bad capitalization to avoid to continue until the next snapshot creation. - if !bank_forks - .read() - .unwrap() - .root_bank() - .calculate_and_verify_capitalization(debug_verify) - { + let bank = bank_forks.read().unwrap().root_bank(); + if start_slot != bank.slot() && !bank.calculate_and_verify_capitalization(debug_verify) { return Err( BlockstoreProcessorError::RootBankWithMismatchedCapitalization( bank_forks.read().unwrap().root(),