after replay at validator startup don't verify hash calc (#28222)

This commit is contained in:
Jeff Washington (jwash) 2022-10-04 14:04:04 -07:00 committed by GitHub
parent 990fb68c34
commit 7ae7a3ff0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -2769,6 +2769,8 @@ fn main() {
poh_verify: !arg_matches.is_present("skip_poh_verify"),
on_halt_store_hash_raw_data_for_debug: arg_matches
.is_present("halt_at_slot_store_hash_raw_data"),
// ledger tool verify always runs the accounts hash calc at the end of processing the blockstore
run_final_accounts_hash_calc: true,
halt_at_slot: value_t!(arg_matches, "halt_at_slot", Slot).ok(),
debug_keys,
accounts_db_caching_enabled: !arg_matches.is_present("no_accounts_db_caching"),

View File

@ -716,6 +716,9 @@ pub struct ProcessOptions {
pub shrink_ratio: AccountShrinkThreshold,
pub runtime_config: RuntimeConfig,
pub on_halt_store_hash_raw_data_for_debug: bool,
/// true if after processing the contents of the blockstore at startup, we should run an accounts hash calc
/// This is useful for debugging.
pub run_final_accounts_hash_calc: bool,
}
pub fn test_process_blockstore(
@ -1551,7 +1554,9 @@ fn load_frozen_forks(
)?;
if slot >= halt_at_slot {
run_final_hash_calc(&bank, on_halt_store_hash_raw_data_for_debug);
if opts.run_final_accounts_hash_calc {
run_final_hash_calc(&bank, on_halt_store_hash_raw_data_for_debug);
}
break;
}
}