Skip to content

Commit

Permalink
chore: merge branch 'john/csdk-twilight' into john/interchaintest
Browse files Browse the repository at this point in the history
  • Loading branch information
shifty11 committed Sep 12, 2023
2 parents b2ce356 + b28e024 commit 8d6ba3d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/upgrades/v1_4/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/ibc-go/v7/modules/core/exported"
ibcTmMigrations "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint/migrations"

// Consensus
consensusKeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper"
Expand All @@ -15,8 +16,7 @@ import (
govKeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
// IBC Core
ibcKeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
// IBC Light Clients
ibcTmMigrations "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint/migrations"

// Params
paramsKeeper "github.com/cosmos/cosmos-sdk/x/params/keeper"
paramsTypes "github.com/cosmos/cosmos-sdk/x/params/types"
Expand Down Expand Up @@ -45,12 +45,6 @@ func CreateUpgradeHandler(
WithKeyTable(paramsTypes.ConsensusParamsKeyTable())
baseapp.MigrateParams(ctx, baseAppSubspace, &consensusKeeper)

// Prune expired Tendermint consensus states.
_, err = ibcTmMigrations.PruneExpiredConsensusStates(ctx, cdc, ibcKeeper.ClientKeeper)
if err != nil {
return vm, err
}

// ibc-go v7.0 to v7.1 upgrade
// explicitly update the IBC 02-client params, adding the localhost client type
params := ibcKeeper.ClientKeeper.GetParams(ctx)
Expand All @@ -63,6 +57,12 @@ func CreateUpgradeHandler(
return vm, err
}

// Prune expired Tendermint consensus states.
_, err = ibcTmMigrations.PruneExpiredConsensusStates(ctx, cdc, ibcKeeper.ClientKeeper)
if err != nil {
return vm, err
}

// Migrate initial deposit ratio.
err = migrateInitialDepositRatio(ctx, globalKeeper, govKeeper)
if err != nil {
Expand Down

0 comments on commit 8d6ba3d

Please sign in to comment.