Only print Foundation inflation rate if it is greater than 0

This commit is contained in:
Michael Vines 2021-06-26 09:15:11 -07:00
parent 8fc4c2f375
commit b44af11511
1 changed files with 9 additions and 5 deletions

View File

@ -1513,11 +1513,15 @@ impl fmt::Display for CliInflation {
"Staking rate: {:>5.2}%", "Staking rate: {:>5.2}%",
self.current_rate.validator * 100. self.current_rate.validator * 100.
)?; )?;
writeln!(
f, if self.current_rate.foundation > 0. {
"Foundation rate: {:>5.2}%", writeln!(
self.current_rate.foundation * 100. f,
) "Foundation rate: {:>5.2}%",
self.current_rate.foundation * 100.
)?;
}
Ok(())
} }
} }