Skip to content

Commit

Permalink
added v0.10.8 upgradehandler
Browse files Browse the repository at this point in the history
  • Loading branch information
ajansari95 committed Jan 11, 2023
1 parent db4777b commit b64d4d7
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}
Expand All @@ -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)
}
}

0 comments on commit b64d4d7

Please sign in to comment.