diff --git a/app/upgrades/multi-staking/upgrade.go b/app/upgrades/multi-staking/upgrade.go index d92365a1..b8dc9c9c 100644 --- a/app/upgrades/multi-staking/upgrade.go +++ b/app/upgrades/multi-staking/upgrade.go @@ -65,15 +65,18 @@ func CreateUpgradeHandler( // migrate multistaking appState, err = migrateMultiStaking(appState) + if err != nil { + panic(err) + } - fmt.Println() - fmt.Println("=============UpgradeHandler=============") - fmt.Printf("%s", appState[multistakingtypes.ModuleName]) - fmt.Println("=============UpgradeHandler=============") - + // validate genesis + var genesisState multistakingtypes.GenesisState + cdc.MustUnmarshalJSON(appState[multistakingtypes.ModuleName], &genesisState) + err = genesisState.Validate() if err != nil { panic(err) } + vm[multistakingtypes.ModuleName] = multistaking.AppModule{}.ConsensusVersion() mm.Modules[multistakingtypes.ModuleName].InitGenesis(ctx, cdc, appState[multistakingtypes.ModuleName])