Skip to content

Commit

Permalink
Merge pull request #574 from neutron-org/fix/empty-consensus-param
Browse files Browse the repository at this point in the history
Fix: nil consensus param
  • Loading branch information
pr0n00gler authored Jun 12, 2024
2 parents 329dcfe + 75cc4c9 commit 2497bea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 5 additions & 0 deletions app/upgrades/v4.0.0/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,11 @@ func enableVoteExtensions(ctx sdk.Context, consensusKeeper *consensuskeeper.Keep
return err
}

oldParams.Params.Version = &comettypes.VersionParams{App: 0}
if err := consensusKeeper.ParamsStore.Set(ctx, *oldParams.Params); err != nil {
return err
}

// we need to enable VoteExtensions for Slinky
oldParams.Params.Abci = &comettypes.ABCIParams{VoteExtensionsEnableHeight: ctx.BlockHeight() + 4}

Expand Down
7 changes: 0 additions & 7 deletions app/upgrades/v4.0.0/upgrades_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,6 @@ func (suite *UpgradeTestSuite) TestDynamicFeesUpgrade() {
ctx := suite.ChainA.GetContext()
t := suite.T()

oldParams, err := app.ConsensusParamsKeeper.Params(ctx, &types.QueryParamsRequest{})
suite.Require().NoError(err)
// it is automatically tracked in upgrade handler, we need to set it manually for tests
oldParams.Params.Version = &comettypes.VersionParams{App: 0}
// we need to properly set consensus params for tests or we get a panic
suite.Require().NoError(app.ConsensusParamsKeeper.ParamsStore.Set(ctx, *oldParams.Params))

upgrade := upgradetypes.Plan{
Name: v400.UpgradeName,
Info: "some text here",
Expand Down

0 comments on commit 2497bea

Please sign in to comment.