Skip to content

Commit

Permalink
Merge pull request #167 from terra-money/fix/enable-interchain-contro…
Browse files Browse the repository at this point in the history
…ller

fix: added ica controller params
  • Loading branch information
emidev98 committed Sep 4, 2023
2 parents fa40790 + 6372b59 commit ed569fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -1134,6 +1134,7 @@ func (app *TerraApp) RegisterUpgradeHandlers(cfg module.Configurator) {
app.IBCKeeper.ClientKeeper,
app.ParamsKeeper,
app.ConsensusParamsKeeper,
app.ICAControllerKeeper,
),
)
}
Expand Down
6 changes: 6 additions & 0 deletions app/upgrades/v2.5/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import (
paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper"
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
icacontrollerkeeper "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/keeper"
icacontrollertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types"
clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper"
ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported"
ibctmmigrations "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint/migrations"
Expand All @@ -21,6 +23,7 @@ func CreateUpgradeHandler(
clientKeeper clientkeeper.Keeper,
paramsKeeper paramskeeper.Keeper,
consensusParamsKeeper consensuskeeper.Keeper,
icacontrollerKeeper icacontrollerkeeper.Keeper,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
// READ: https://github.com/cosmos/cosmos-sdk/blob/v0.47.4/UPGRADING.md#xconsensus
Expand All @@ -39,6 +42,9 @@ func CreateUpgradeHandler(
params.AllowedClients = append(params.AllowedClients, ibcexported.Localhost)
clientKeeper.SetParams(ctx, params)

// READ: https://github.com/terra-money/core/issues/166
icacontrollerKeeper.SetParams(ctx, icacontrollertypes.DefaultParams())

return mm.RunMigrations(ctx, cfg, fromVM)
}
}

0 comments on commit ed569fe

Please sign in to comment.