verify bank hash on startup with ledger tool option (#17939)

This commit is contained in:
Jeff Washington (jwash)
2021-06-15 11:52:12 -05:00
committed by GitHub
parent 1b1d34da59
commit f558b9b6bf
7 changed files with 59 additions and 39 deletions

View File

@@ -655,11 +655,14 @@ impl Accounts {
slot: Slot,
ancestors: &Ancestors,
total_lamports: u64,
test_hash_calculation: bool,
) -> bool {
if let Err(err) =
self.accounts_db
.verify_bank_hash_and_lamports(slot, ancestors, total_lamports)
{
if let Err(err) = self.accounts_db.verify_bank_hash_and_lamports(
slot,
ancestors,
total_lamports,
test_hash_calculation,
) {
warn!("verify_bank_hash failed: {:?}", err);
false
} else {