diff --git a/app/upgrades.go b/app/upgrades.go index a846bc969..b4198549d 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -2,21 +2,23 @@ package app import ( "fmt" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" ) // upgrade name consts: vMMmmppUpgradeName (M=Major, m=minor, p=patch) const ( - ProductionChainID = "quicksilver-1" - InnuendoChainID = "innuendo-3" - Innuendo2ChainID = "innuendo-4" - DevnetChainID = "quicktest-1" + InnuendoChainID = "innuendo-3" + Innuendo2ChainID = "innuendo-4" + DevnetChainID = "quicktest-1" + + v001008UpgradeName = "v0.10.8" ) func setUpgradeHandlers(app *Quicksilver) { - //app.UpgradeKeeper.SetUpgradeHandler(v001000UpgradeName, getv001000Upgrade(app)) + app.UpgradeKeeper.SetUpgradeHandler(v001008UpgradeName, noOpHandler(app)) // When a planned update height is reached, the old binary will panic // writing on disk the height and name of the update that triggered it @@ -33,11 +35,7 @@ func setUpgradeHandlers(app *Quicksilver) { var storeUpgrades *storetypes.StoreUpgrades switch upgradeInfo.Name { - // case v001000UpgradeName: - // storeUpgrades = &storetypes.StoreUpgrades{ - // Added: []string{claimsmanagertypes.ModuleName}, - // } default: // no-op } @@ -46,3 +44,9 @@ func setUpgradeHandlers(app *Quicksilver) { app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, storeUpgrades)) } } + +func noOpHandler(app *Quicksilver) upgradetypes.UpgradeHandler { + return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return app.mm.RunMigrations(ctx, app.configurator, fromVM) + } +}