laconicd/app/upgrades.go

15 lines
481 B
Go
Raw Normal View History

2022-10-10 10:38:33 +00:00
package app
import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
)
func (app *EthermintApp) RegisterUpgradeHandlers() {
planName := "integration-test-upgrade"
app.UpgradeKeeper.SetUpgradeHandler(planName, func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
return app.mm.RunMigrations(ctx, app.configurator, fromVM)
})
}