Add block-height subcommand

This commit is contained in:
Michael Vines
2020-07-22 08:36:12 -07:00
parent 2adfe3f199
commit 50c92e3a94
3 changed files with 26 additions and 1 deletions

View File

@@ -206,7 +206,11 @@ impl From<EpochInfo> for CliEpochInfo {
impl fmt::Display for CliEpochInfo {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
writeln!(f)?;
writeln_name_value(f, "Block height:", &self.epoch_info.block_height.to_string())?;
writeln_name_value(
f,
"Block height:",
&self.epoch_info.block_height.to_string(),
)?;
writeln_name_value(f, "Slot:", &self.epoch_info.absolute_slot.to_string())?;
writeln_name_value(f, "Epoch:", &self.epoch_info.epoch.to_string())?;
let start_slot = self.epoch_info.absolute_slot - self.epoch_info.slot_index;