CLI: Support querying fees by blockhash

This commit is contained in:
Trent Nelson
2021-02-25 23:48:33 -07:00
committed by Trent Nelson
parent ebd56f7ff4
commit 21e08b5b2c
3 changed files with 75 additions and 19 deletions

View File

@ -1475,8 +1475,11 @@ impl fmt::Display for CliFeesInner {
"Lamports per signature:",
&self.lamports_per_signature.to_string(),
)?;
writeln_name_value(f, "Last valid slot:", &self.last_valid_slot.to_string())?;
Ok(())
let last_valid_slot = self
.last_valid_slot
.map(|s| s.to_string())
.unwrap_or_default();
writeln_name_value(f, "Last valid slot:", &last_valid_slot)
}
}