15 lines
481 B
Go
15 lines
481 B
Go
|
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)
|
||
|
})
|
||
|
}
|