cleanup TestInitGenesis
This commit is contained in:
parent
cfb3ba75af
commit
a85fdcc23b
|
@ -577,46 +577,26 @@ func TestPool(t *testing.T) {
|
|||
|
||||
func TestInitGenesis(t *testing.T) {
|
||||
ctx, _, keeper := createTestInput(t, nil, false, 0)
|
||||
encoded := json.RawMessage(`{
|
||||
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
|
||||
},
|
||||
"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_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
|
||||
"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())
|
||||
|
|
|
@ -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"`
|
||||
|
|
Loading…
Reference in New Issue