From b850d71f7af90885d6954eaf5fb2eccad0b7f008 Mon Sep 17 00:00:00 2001 From: Sergio Mena Date: Fri, 10 May 2024 16:13:34 +0200 Subject: [PATCH] Fixed `NewIntegrationApp` --- testutil/integration/router.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/testutil/integration/router.go b/testutil/integration/router.go index e921c4013347..c3f0c954019e 100644 --- a/testutil/integration/router.go +++ b/testutil/integration/router.go @@ -6,6 +6,7 @@ import ( cmtabcitypes "github.com/cometbft/cometbft/abci/types" cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" + cmttypes "github.com/cometbft/cometbft/types" dbm "github.com/cosmos/cosmos-db" "cosmossdk.io/core/address" @@ -93,13 +94,8 @@ func NewIntegrationApp( bApp.SetParamStore(consensusParamsKeeper.ParamsStore) consensusparamtypes.RegisterQueryServer(grpcRouter, consensusParamsKeeper) - _, err := consensusParamsKeeper.SetParams(sdkCtx, &consensusparamtypes.ConsensusMsgParams{ - Version: simtestutil.DefaultConsensusParams.Version, - Block: simtestutil.DefaultConsensusParams.Block, - Evidence: simtestutil.DefaultConsensusParams.Evidence, - Validator: simtestutil.DefaultConsensusParams.Validator, - Abci: simtestutil.DefaultConsensusParams.Abci, - }) + params := cmttypes.ConsensusParamsFromProto(*simtestutil.DefaultConsensusParams) // This fills up missing param sections + err := consensusParamsKeeper.ParamsStore.Set(sdkCtx, params.ToProto()) if err != nil { panic(fmt.Errorf("failed to set consensus params: %w", err)) }