Skip to content

Commit

Permalink
ledger tool halt at slot verify hash (solana-labs#23424)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwashington authored Mar 2, 2022
1 parent d909b7c commit ef8b7d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ledger/src/blockstore_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ef8b7d9

Please sign in to comment.