ledger tool limit_load_slot_count_from_snapshot avoids assert failures (#17974)

This commit is contained in:
Jeff Washington (jwash)
2021-06-15 15:39:22 -05:00
committed by GitHub
parent 0323ea9f7e
commit dbd4dc04b0
7 changed files with 37 additions and 14 deletions

View File

@@ -652,7 +652,9 @@ pub fn bank_from_archive<P: AsRef<Path>>(
measure.stop();
let mut verify = Measure::start("verify");
if !bank.verify_snapshot_bank(test_hash_calculation) {
if !bank.verify_snapshot_bank(test_hash_calculation)
&& limit_load_slot_count_from_snapshot.is_none()
{
panic!("Snapshot bank for slot {} failed to verify", bank.slot());
}
verify.stop();