diff --git a/x/stake/keeper_test.go b/x/stake/keeper_test.go index d7886ba01e..9a0d0f30ea 100644 --- a/x/stake/keeper_test.go +++ b/x/stake/keeper_test.go @@ -577,46 +577,26 @@ func TestPool(t *testing.T) { func TestInitGenesis(t *testing.T) { ctx, _, keeper := createTestInput(t, nil, false, 0) - encoded := json.RawMessage(`{ - "params": { - "inflation_rate_change": { - "num": 13, - "denom": 100 - }, - "inflation_max": { - "num": 20, - "denom": 100 - }, - "inflation_min": { - "num": 7, - "denom": 100 - }, - "goal_bonded": { - "num": 67, - "denom": 100 - }, - "max_validators": 100, - "bond_denom": "fermion" - }, - "pool": { - "total_supply": 0, - "bonded_shares": { - "num": 0, - "denom": 1 - }, - "unbonded_shares": { - "num": 0, - "denom": 1 - }, - "bonded_pool": 0, - "unbonded_pool": 0, - "inflation_last_time": 0, - "inflation": { - "num": 7, - "denom": 100 - } - } - }`) + jsonStr := `{ + "params": { + "inflation_rate_change": {"num": 13, "denom": 100}, + "inflation_max": {"num": 20, "denom": 100}, + "inflation_min": {"num": 7, "denom": 100}, + "goal_bonded": {"num": 67, "denom": 100}, + "max_validators": 100, + "bond_denom": "fermion" + }, + "pool": { + "total_supply": 0, + "bonded_shares": {"num": 0, "denom": 1}, + "unbonded_shares": {"num": 0, "denom": 1}, + "bonded_pool": 0, + "unbonded_pool": 0, + "inflation_last_time": 0, + "inflation": {"num": 7, "denom": 100} + } +}` + encoded := json.RawMessage(jsonStr) err := keeper.InitGenesis(ctx, encoded) require.Nil(t, err) require.Equal(t, keeper.GetPool(ctx), initialPool()) diff --git a/x/stake/types.go b/x/stake/types.go index 9dfeeca202..7e7fb9e753 100644 --- a/x/stake/types.go +++ b/x/stake/types.go @@ -30,7 +30,6 @@ type Pool struct { } // GenesisState - all staking state that must be provided at genesis - type GenesisState struct { Pool Pool `json:"pool"` Params Params `json:"params"`