refactor(slashing)!: use collections for params state (#16441)

Co-authored-by: marbar3778 <marbar3778@yahoo.com>
This commit is contained in:
samricotta
2023-07-06 07:12:11 +00:00
committed by GitHub
co-authored by marbar3778
parent fbe087dfbb
commit 5931f1e65e
15 changed files with 42 additions and 56 deletions
@@ -151,7 +151,7 @@ func initFixture(tb testing.TB) *fixture {
evidencetypes.RegisterMsgServer(integrationApp.MsgServiceRouter(), keeper.NewMsgServerImpl(*evidenceKeeper))
evidencetypes.RegisterQueryServer(integrationApp.QueryHelper(), keeper.NewQuerier(evidenceKeeper))
assert.NilError(tb, slashingKeeper.SetParams(sdkCtx, testutil.TestParams()))
assert.NilError(tb, slashingKeeper.Params.Set(sdkCtx, testutil.TestParams()))
// set default staking params
assert.NilError(tb, stakingKeeper.SetParams(sdkCtx, stakingtypes.DefaultParams()))
@@ -117,7 +117,7 @@ func initFixture(tb testing.TB) *fixture {
stakingKeeper.SetParams(sdkCtx, stakingtypes.DefaultParams())
// TestParams set the SignedBlocksWindow to 1000 and MaxMissedBlocksPerWindow to 500
slashingKeeper.SetParams(sdkCtx, testutil.TestParams())
slashingKeeper.Params.Set(sdkCtx, testutil.TestParams())
addrDels := simtestutil.AddTestAddrsIncremental(bankKeeper, stakingKeeper, sdkCtx, 6, stakingKeeper.TokensFromConsensusPower(sdkCtx, 200))
valAddrs := simtestutil.ConvertAddrsToValAddrs(addrDels)