Downgrades log to warn if reading bank snapshot from dir fails (#31885)

This commit is contained in:
Brooks 2023-05-30 19:35:06 -04:00 committed by GitHub
parent 33d64c6b2f
commit 8e191bbc56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 6 deletions

View File

@ -860,12 +860,8 @@ pub fn get_bank_snapshots(bank_snapshots_dir: impl AsRef<Path>) -> Vec<BankSnaps
})
.for_each(
|slot| match BankSnapshotInfo::new_from_dir(&bank_snapshots_dir, slot) {
Ok(snapshot_info) => {
bank_snapshots.push(snapshot_info);
}
Err(err) => {
error!("Unable to read bank snapshot for slot {}: {}", slot, err);
}
Ok(snapshot_info) => bank_snapshots.push(snapshot_info),
Err(err) => warn!("Unable to read bank snapshot for slot {slot}: {err}"),
},
),
}