Only print Foundation inflation rate if it is greater than 0

(cherry picked from commit b44af11511)
This commit is contained in:
Michael Vines
2021-06-26 09:15:11 -07:00
parent 328b52c4d6
commit 41d50adbf3

View File

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