diff --git a/app/app.go b/app/app.go index 65d08d77f..cf1f40c63 100644 --- a/app/app.go +++ b/app/app.go @@ -1345,24 +1345,16 @@ func (a *App) registerUpgradeHandlers() { // 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 // This will read that value, and execute the preparations for the upgrade. + a.UpgradeKeeper.SetUpgradeHandler( + mv11.UpgradeName, + mv11.CreateUpgradeHandlerV11(a.mm, a.configurator, a.LiquidityKeeper, a.AssetKeeper, a.BankKeeper, a.AccountKeeper, a.Rewardskeeper, a.ICAHostKeeper), + ) + upgradeInfo, err := a.UpgradeKeeper.ReadUpgradeInfoFromDisk() if err != nil { panic(err) } - switch { - case upgradeInfo.Name == tv11_4.UpgradeName: - a.UpgradeKeeper.SetUpgradeHandler( - tv11_4.UpgradeName, - tv11_4.CreateUpgradeHandlerV114(a.mm, a.configurator, a.AssetKeeper), - ) - case upgradeInfo.Name == mv11.UpgradeName: - a.UpgradeKeeper.SetUpgradeHandler( - mv11.UpgradeName, - mv11.CreateUpgradeHandlerV11(a.mm, a.configurator, a.LiquidityKeeper, a.AssetKeeper, a.BankKeeper, a.AccountKeeper, a.Rewardskeeper, a.ICAHostKeeper), - ) - } - var storeUpgrades *storetypes.StoreUpgrades storeUpgrades = upgradeHandlers(upgradeInfo, a, storeUpgrades) diff --git a/go.mod b/go.mod index 185c4f295..3ec8a1490 100644 --- a/go.mod +++ b/go.mod @@ -280,7 +280,7 @@ require ( replace ( github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 - github.com/cosmos/cosmos-sdk => github.com/comdex-official/cosmos-sdk v0.45.9-comdex.5 + github.com/cosmos/cosmos-sdk => github.com/comdex-official/cosmos-sdk v0.45.9-comdex.4 //breaking changes github.com/cosmos/iavl v0.19.5 => github.com/cosmos/iavl v0.19.4 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 diff --git a/go.sum b/go.sum index d299466fa..a60917bd1 100644 --- a/go.sum +++ b/go.sum @@ -608,8 +608,8 @@ github.com/coinbase/kryptology v1.8.0/go.mod h1:RYXOAPdzOGUe3qlSFkMGn58i3xUA8hmx github.com/coinbase/rosetta-sdk-go v0.7.0/go.mod h1:7nD3oBPIiHqhRprqvMgPoGxe/nyq3yftRmpsy29coWE= github.com/coinbase/rosetta-sdk-go v0.7.9 h1:lqllBjMnazTjIqYrOGv8h8jxjg9+hJazIGZr9ZvoCcA= github.com/coinbase/rosetta-sdk-go v0.7.9/go.mod h1:0/knutI7XGVqXmmH4OQD8OckFrbQ8yMsUZTG7FXCR2M= -github.com/comdex-official/cosmos-sdk v0.45.9-comdex.5 h1:RnRxY6M1baLuV39F5mxHoH8mMh5Y6ZQH92Jp60kROSU= -github.com/comdex-official/cosmos-sdk v0.45.9-comdex.5/go.mod h1:Z5M4TX7PsHNHlF/1XanI2DIpORQ+Q/st7oaeufEjnvU= +github.com/comdex-official/cosmos-sdk v0.45.9-comdex.4 h1:HamsRfrxsCvkwcHbMT8TDW3u013MmixXqbcCt/doxLo= +github.com/comdex-official/cosmos-sdk v0.45.9-comdex.4/go.mod h1:Z5M4TX7PsHNHlF/1XanI2DIpORQ+Q/st7oaeufEjnvU= github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= github.com/consensys/bavard v0.1.8-0.20210915155054-088da2f7f54a/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q=