Skip to content

Commit aae0c6c

Browse files
authored
fix!: add missing consensus module registration; register gov hooks (#2907)
* fix!: add missing consensus module registration; update hooks registration * fix!: register params migration
1 parent af052c7 commit aae0c6c

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

app/keepers/keepers.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,9 @@ func NewAppKeeper(
331331
appKeepers.GovKeeper.SetLegacyRouter(govRouter)
332332

333333
appKeepers.GovKeeper = appKeepers.GovKeeper.SetHooks(
334-
appKeepers.ProviderKeeper.Hooks(),
334+
govtypes.NewMultiGovHooks(
335+
appKeepers.ProviderKeeper.Hooks(),
336+
),
335337
)
336338

337339
evidenceKeeper := evidencekeeper.NewKeeper(

app/modules.go

+1
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ func appModules(
144144
ibc.NewAppModule(app.IBCKeeper),
145145
sdkparams.NewAppModule(app.ParamsKeeper),
146146
globalfee.NewAppModule(app.GetSubspace(globalfee.ModuleName)),
147+
consensus.NewAppModule(appCodec, app.ConsensusParamsKeeper),
147148
app.TransferModule,
148149
app.ICAModule,
149150
app.PFMRouterModule,

app/upgrades/v15/upgrades.go

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package v15
33
import (
44
"fmt"
55

6+
"github.com/cosmos/cosmos-sdk/baseapp"
67
"github.com/cosmos/cosmos-sdk/store/prefix"
78
storetypes "github.com/cosmos/cosmos-sdk/store/types"
89
sdk "github.com/cosmos/cosmos-sdk/types"
@@ -16,6 +17,7 @@ import (
1617
distributionkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper"
1718
distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
1819
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
20+
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"
1921
slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper"
2022
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
2123
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
@@ -40,6 +42,9 @@ func CreateUpgradeHandler(
4042
) upgradetypes.UpgradeHandler {
4143
return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
4244
ctx.Logger().Info("Starting module migrations...")
45+
baseAppLegacySS := keepers.ParamsKeeper.Subspace(baseapp.Paramspace).
46+
WithKeyTable(paramstypes.ConsensusParamsKeyTable())
47+
baseapp.MigrateParams(ctx, baseAppLegacySS, &keepers.ConsensusParamsKeeper)
4348

4449
vm, err := mm.RunMigrations(ctx, configurator, vm)
4550
if err != nil {

0 commit comments

Comments
 (0)