diff --git a/CHANGELOG.md b/CHANGELOG.md index 787ddee263c3..9fc9e797f3a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### API Breaking Changes +* (x/mint) [\#10441](https://github.com/cosmos/cosmos-sdk/pull/10441) The `NewAppModule` function now accepts an inflation calculation function as an argument. * [\#10295](https://github.com/cosmos/cosmos-sdk/pull/10295) Remove store type aliases from /types * [\#9695](https://github.com/cosmos/cosmos-sdk/pull/9695) Migrate keys from `Info` -> `Record` * Add new `codec.Codec` argument in: diff --git a/x/mint/module.go b/x/mint/module.go index 975c3cfd2b8c..be5ba7fdf2f9 100644 --- a/x/mint/module.go +++ b/x/mint/module.go @@ -95,7 +95,8 @@ type AppModule struct { inflationCalculator types.InflationCalculationFn } -// NewAppModule creates a new AppModule object +// NewAppModule creates a new AppModule object. If the InflationCalculationFn +// argument is nil, then the SDK's default inflation function will be used. func NewAppModule(cdc codec.Codec, keeper keeper.Keeper, ak types.AccountKeeper, ic types.InflationCalculationFn) AppModule { if ic == nil { ic = types.DefaultInflationCalculationFn diff --git a/x/mint/types/genesis.go b/x/mint/types/genesis.go index 7f57b09178ea..75c69502bb02 100644 --- a/x/mint/types/genesis.go +++ b/x/mint/types/genesis.go @@ -12,7 +12,7 @@ import ( type InflationCalculationFn func(ctx sdk.Context, minter Minter, params Params, bondedRatio sdk.Dec) sdk.Dec // DefaultInflationCalculationFn is the default function used to calculate inflation. -func DefaultInflationCalculationFn(ctx sdk.Context, minter Minter, params Params, bondedRatio sdk.Dec) sdk.Dec { +func DefaultInflationCalculationFn(_ sdk.Context, minter Minter, params Params, bondedRatio sdk.Dec) sdk.Dec { return minter.NextInflationRate(params, bondedRatio) }