Skip to content

Commit

Permalink
create-snapshot check if snapshot slot exists (#27153)
Browse files Browse the repository at this point in the history
  • Loading branch information
apfitzge authored Aug 19, 2022
1 parent 40b9f2f commit 6da3eb0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ledger-tool/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2817,6 +2817,11 @@ fn main() {
value_t_or_exit!(arg_matches, "snapshot_slot", Slot)
};

assert!(
blockstore.meta(snapshot_slot).unwrap().is_some(),
"snapshot slot doesn't exist"
);

let ending_slot = if is_minimized {
let ending_slot = value_t_or_exit!(arg_matches, "ending_slot", Slot);
if ending_slot <= snapshot_slot {
Expand Down

0 comments on commit 6da3eb0

Please sign in to comment.