From e4ac128840abb64a1248f265ee05c0656c16efae Mon Sep 17 00:00:00 2001 From: Facundo Medica <14063057+facundomedica@users.noreply.github.com> Date: Fri, 23 Dec 2022 16:08:46 -0300 Subject: [PATCH] chore: fix mint comments on inflation rate (#14404) --- x/mint/README.md | 2 +- x/mint/types/minter.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/x/mint/README.md b/x/mint/README.md index 00b16e7738..14683b851d 100644 --- a/x/mint/README.md +++ b/x/mint/README.md @@ -101,7 +101,7 @@ NextInflationRate(params Params, bondedRatio sdk.Dec) (inflation sdk.Dec) { inflationRateChangePerYear = (1 - bondedRatio/params.GoalBonded) * params.InflationRateChange inflationRateChange = inflationRateChangePerYear/blocksPerYr - // increase the new annual inflation for this next cycle + // increase the new annual inflation for this next block inflation += inflationRateChange if inflation > params.InflationMax { inflation = params.InflationMax diff --git a/x/mint/types/minter.go b/x/mint/types/minter.go index 9605d04705..1f5db5400b 100644 --- a/x/mint/types/minter.go +++ b/x/mint/types/minter.go @@ -42,11 +42,11 @@ func ValidateMinter(minter Minter) error { return nil } -// NextInflationRate returns the new inflation rate for the next hour. +// NextInflationRate returns the new inflation rate for the next block. func (m Minter) NextInflationRate(params Params, bondedRatio sdk.Dec) math.LegacyDec { - // The target annual inflation rate is recalculated for each previsions cycle. The - // inflation is also subject to a rate change (positive or negative) depending on - // the distance from the desired ratio (67%). The maximum rate change possible is + // The target annual inflation rate is recalculated for each block. The inflation + // is also subject to a rate change (positive or negative) depending on the + // distance from the desired ratio (67%). The maximum rate change possible is // defined to be 13% per year, however the annual inflation is capped as between // 7% and 20%. @@ -56,7 +56,7 @@ func (m Minter) NextInflationRate(params Params, bondedRatio sdk.Dec) math.Legac Mul(params.InflationRateChange) inflationRateChange := inflationRateChangePerYear.Quo(math.LegacyNewDec(int64(params.BlocksPerYear))) - // adjust the new annual inflation for this next cycle + // adjust the new annual inflation for this next block inflation := m.Inflation.Add(inflationRateChange) // note inflationRateChange may be negative if inflation.GT(params.InflationMax) { inflation = params.InflationMax