Skip to content

Commit

Permalink
fix: added ica controller params
Browse files Browse the repository at this point in the history
  • Loading branch information
javiersuweijie committed Sep 4, 2023
1 parent 8de72eb commit 6372b59
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 6372b59

Please sign in to comment.