cargo fmt
This commit is contained in:
@ -727,32 +727,30 @@ fn main() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
("bounds", Some(args_matches)) => {
|
("bounds", Some(args_matches)) => match blocktree.slot_meta_iterator(0) {
|
||||||
match blocktree.slot_meta_iterator(0) {
|
Ok(metas) => {
|
||||||
Ok(metas) => {
|
let all = args_matches.is_present("all");
|
||||||
let all = args_matches.is_present("all");
|
|
||||||
|
|
||||||
println!("Collecting Ledger information...");
|
println!("Collecting Ledger information...");
|
||||||
let slots: Vec<_> = metas.map(|(slot, _)| slot).collect();
|
let slots: Vec<_> = metas.map(|(slot, _)| slot).collect();
|
||||||
if slots.is_empty() {
|
if slots.is_empty() {
|
||||||
println!("Ledger is empty. No slots found.");
|
println!("Ledger is empty. No slots found.");
|
||||||
} else {
|
} else {
|
||||||
let first = slots.first().unwrap();
|
let first = slots.first().unwrap();
|
||||||
let last = slots.last().unwrap_or_else(|| first);
|
let last = slots.last().unwrap_or_else(|| first);
|
||||||
if first != last {
|
if first != last {
|
||||||
println!("Ledger contains data from slots {:?} to {:?}", first, last);
|
println!("Ledger contains data from slots {:?} to {:?}", first, last);
|
||||||
if all {
|
if all {
|
||||||
println!("Non-empty slots: {:?}", slots);
|
println!("Non-empty slots: {:?}", slots);
|
||||||
}
|
|
||||||
} else {
|
|
||||||
println!("Ledger only contains some data for slot {:?}", first);
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
println!("Ledger only contains some data for slot {:?}", first);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Err(err) => {
|
}
|
||||||
eprintln!("Unable to read the Ledger: {:?}", err);
|
Err(err) => {
|
||||||
exit(1);
|
eprintln!("Unable to read the Ledger: {:?}", err);
|
||||||
}
|
exit(1);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
("", _) => {
|
("", _) => {
|
||||||
|
Reference in New Issue
Block a user