Groom ledger-tool bounds output (#8710)
This commit is contained in:
parent
f992ee3140
commit
acb23e8ef0
|
@ -1093,20 +1093,19 @@ fn main() {
|
||||||
Ok(metas) => {
|
Ok(metas) => {
|
||||||
let all = arg_matches.is_present("all");
|
let all = arg_matches.is_present("all");
|
||||||
|
|
||||||
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");
|
||||||
} 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 has data for slots {:?} to {:?}", first, last);
|
||||||
if all {
|
if all {
|
||||||
println!("Non-empty slots: {:?}", slots);
|
println!("Non-empty slots: {:?}", slots);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
println!("Ledger only contains some data for slot {:?}", first);
|
println!("Ledger has data for slot {:?}", first);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue