Clean up "APR" language around inflation rewards

This commit is contained in:
Michael Vines
2021-04-21 15:52:32 -07:00
parent 123e0bdba7
commit b8b54567b1
3 changed files with 16 additions and 7 deletions

View File

@ -1405,18 +1405,18 @@ impl fmt::Display for CliInflation {
if (self.governor.initial - self.governor.terminal).abs() < f64::EPSILON {
writeln!(
f,
"Fixed APR: {:>5.2}%",
"Fixed rate: {:>5.2}%",
self.governor.terminal * 100.
)?;
} else {
writeln!(
f,
"Initial APR: {:>5.2}%",
"Initial rate: {:>5.2}%",
self.governor.initial * 100.
)?;
writeln!(
f,
"Terminal APR: {:>5.2}%",
"Terminal rate: {:>5.2}%",
self.governor.terminal * 100.
)?;
writeln!(
@ -1424,6 +1424,10 @@ impl fmt::Display for CliInflation {
"Rate reduction per year: {:>5.2}%",
self.governor.taper * 100.
)?;
writeln!(
f,
"* Rate reduction is derived using the target slot time in genesis config"
)?;
}
if self.governor.foundation_term > 0. {
writeln!(
@ -1445,17 +1449,17 @@ impl fmt::Display for CliInflation {
)?;
writeln!(
f,
"Total APR: {:>5.2}%",
"Total rate: {:>5.2}%",
self.current_rate.total * 100.
)?;
writeln!(
f,
"Staking APR: {:>5.2}%",
"Staking rate: {:>5.2}%",
self.current_rate.validator * 100.
)?;
writeln!(
f,
"Foundation APR: {:>5.2}%",
"Foundation rate: {:>5.2}%",
self.current_rate.foundation * 100.
)
}