Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
remove extra accounts cap call at startup (backport #27949) (#27995)
Browse files Browse the repository at this point in the history
* remove extra accounts cap call at startup (#27949)

(cherry picked from commit 7ddacc4)

# Conflicts:
#	ledger/src/blockstore_processor.rs

* fix merge conflicts

Co-authored-by: Jeff Washington (jwash) <[email protected]>
  • Loading branch information
mergify[bot] and jeffwashington authored Sep 25, 2022
1 parent e916d8e commit 8bde78e
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions ledger/src/blockstore_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -845,25 +845,6 @@ pub fn process_blockstore_from_root(

let processing_time = now.elapsed();

let debug_verify = opts.accounts_db_test_hash_calculation;
let mut time_cap = Measure::start("capitalization");
// 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)
{
return Err(
BlockstoreProcessorError::RootBankWithMismatchedCapitalization(
bank_forks.read().unwrap().root(),
),
);
}
time_cap.stop();

datapoint_info!(
"process_blockstore_from_root",
("total_time_us", processing_time.as_micros(), i64),
Expand All @@ -874,7 +855,6 @@ pub fn process_blockstore_from_root(
),
("slot", bank_forks.read().unwrap().root(), i64),
("forks", bank_forks.read().unwrap().banks().len(), i64),
("calculate_capitalization_us", time_cap.as_us(), i64),
);

info!("ledger processing timing: {:?}", timing);
Expand Down

0 comments on commit 8bde78e

Please sign in to comment.