Merge PR #3566: Ensure mint/inflation params respect flag supplied by the caller
This commit is contained in:
parent
7f74b33e21
commit
360c7d2c58
|
@ -287,6 +287,19 @@ func InitializeTestLCD(t *testing.T, nValidators int, initAddrs []sdk.AccAddress
|
||||||
genesisState.MintData.Minter.Inflation = inflationMin
|
genesisState.MintData.Minter.Inflation = inflationMin
|
||||||
genesisState.MintData.Params.InflationMin = inflationMin
|
genesisState.MintData.Params.InflationMin = inflationMin
|
||||||
|
|
||||||
|
// double check inflation is set according to the minting boolean flag
|
||||||
|
if minting {
|
||||||
|
require.Equal(t, sdk.MustNewDecFromStr("15000.0"),
|
||||||
|
genesisState.MintData.Params.InflationMax)
|
||||||
|
require.Equal(t, sdk.MustNewDecFromStr("10000.0"), genesisState.MintData.Minter.Inflation)
|
||||||
|
require.Equal(t, sdk.MustNewDecFromStr("10000.0"),
|
||||||
|
genesisState.MintData.Params.InflationMin)
|
||||||
|
} else {
|
||||||
|
require.Equal(t, sdk.ZeroDec(), genesisState.MintData.Params.InflationMax)
|
||||||
|
require.Equal(t, sdk.ZeroDec(), genesisState.MintData.Minter.Inflation)
|
||||||
|
require.Equal(t, sdk.ZeroDec(), genesisState.MintData.Params.InflationMin)
|
||||||
|
}
|
||||||
|
|
||||||
appState, err := codec.MarshalJSONIndent(cdc, genesisState)
|
appState, err := codec.MarshalJSONIndent(cdc, genesisState)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
genDoc.AppState = appState
|
genDoc.AppState = appState
|
||||||
|
|
Loading…
Reference in New Issue