ledger tool halt at slot verify hash (#23424)

This commit is contained in:
Jeff Washington (jwash) 2022-03-02 11:11:18 -06:00 committed by GitHub
parent d909b7c80b
commit ef8b7d9c62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -1374,6 +1374,8 @@ fn load_frozen_forks(
)?;
if slot >= dev_halt_at_slot {
bank.force_flush_accounts_cache();
let _ = bank.verify_bank_hash(false);
break;
}
}

View File

@ -5777,7 +5777,7 @@ impl Bank {
/// snapshot.
/// Only called from startup or test code.
#[must_use]
fn verify_bank_hash(&self, test_hash_calculation: bool) -> bool {
pub fn verify_bank_hash(&self, test_hash_calculation: bool) -> bool {
self.rc.accounts.verify_bank_hash_and_lamports(
self.slot(),
&self.ancestors,