Skip to content

Commit

Permalink
add upgrade handler for v1.6.0-beta1 (#1542)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Bowman authored May 2, 2024
1 parent fe395c5 commit 8520783
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/upgrades/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const (
V010500rc1UpgradeName = "v1.5.0-rc1"
V010503rc0UpgradeName = "v1.5.3-rc0"
V010600beta0UpgradeName = "v1.6.0-beta0"
V010600beta1UpgradeName = "v1.6.0-beta1"
V010600rc0UpgradeName = "v1.6.0-rc0"
V010600rc1UpgradeName = "v1.6.0-rc1"

Expand Down
1 change: 1 addition & 0 deletions app/upgrades/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func Upgrades() []Upgrade {
{UpgradeName: V010500rc1UpgradeName, CreateUpgradeHandler: V010500rc1UpgradeHandler},
{UpgradeName: V010503rc0UpgradeName, CreateUpgradeHandler: V010503rc0UpgradeHandler},
{UpgradeName: V010600beta0UpgradeName, CreateUpgradeHandler: V010600beta0UpgradeHandler},
{UpgradeName: V010600beta1UpgradeName, CreateUpgradeHandler: V010600beta1UpgradeHandler},
{UpgradeName: V010600rc0UpgradeName, CreateUpgradeHandler: V010600rc0UpgradeHandler},

// v1.2: this needs to be present to support upgrade on mainnet
Expand Down
14 changes: 14 additions & 0 deletions app/upgrades/v1_6.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@ import (

// ============ TESTNET UPGRADE HANDLERS ============

func V010600beta1UpgradeHandler(
mm *module.Manager,
configurator module.Configurator,
appKeepers *keepers.AppKeepers,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
if isTestnet(ctx) {
appKeepers.UpgradeKeeper.Logger(ctx).Info("removing defunct zones")
appKeepers.InterchainstakingKeeper.RemoveZoneAndAssociatedRecords(ctx, "elgafar-1")
}
return mm.RunMigrations(ctx, configurator, fromVM)
}
}

func V010600beta0UpgradeHandler(
mm *module.Manager,
configurator module.Configurator,
Expand Down

0 comments on commit 8520783

Please sign in to comment.