Add column for slot range of epoch to epoch-info (#7954)

automerge
This commit is contained in:
Ryo Onodera 2020-01-24 13:44:37 +09:00 committed by Grimes
parent afaa359b0d
commit 992e985972
1 changed files with 6 additions and 0 deletions

View File

@ -426,6 +426,12 @@ pub fn process_get_epoch_info(
println!();
println_name_value("Slot:", &epoch_info.absolute_slot.to_string());
println_name_value("Epoch:", &epoch_info.epoch.to_string());
let start_slot = epoch_info.absolute_slot - epoch_info.slot_index;
let end_slot = start_slot + epoch_info.slots_in_epoch;
println_name_value(
"Epoch slot range:",
&format!("[{}..{})", start_slot, end_slot),
);
println_name_value(
"Epoch completed percent:",
&format!(