From ad33f2dc29e9895a578cc06c1f54d7fb813a1931 Mon Sep 17 00:00:00 2001 From: Yaroms <103432884+Yaroms@users.noreply.github.com> Date: Fri, 3 Nov 2023 00:12:52 +0200 Subject: [PATCH] added handler (#941) Co-authored-by: Yarom Swisa --- app/app.go | 1 + app/upgrades/empty_upgrades.go | 6 ++++++ x/protocol/module.go | 7 ++++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/app.go b/app/app.go index 9a36e489ef..aece4df6e5 100644 --- a/app/app.go +++ b/app/app.go @@ -152,6 +152,7 @@ var Upgrades = []upgrades.Upgrade{ upgrades.Upgrade_0_25_2, upgrades.Upgrade_0_26_0, upgrades.Upgrade_0_26_1, + upgrades.Upgrade_0_26_2, } // this line is used by starport scaffolding # stargate/wasm/app/enabledProposals diff --git a/app/upgrades/empty_upgrades.go b/app/upgrades/empty_upgrades.go index 7dbe888b85..821b24d7d9 100644 --- a/app/upgrades/empty_upgrades.go +++ b/app/upgrades/empty_upgrades.go @@ -128,3 +128,9 @@ var Upgrade_0_26_1 = Upgrade{ CreateUpgradeHandler: defaultUpgradeHandler, StoreUpgrades: store.StoreUpgrades{}, } + +var Upgrade_0_26_2 = Upgrade{ + UpgradeName: "v0.26.2", + CreateUpgradeHandler: defaultUpgradeHandler, + StoreUpgrades: store.StoreUpgrades{}, +} diff --git a/x/protocol/module.go b/x/protocol/module.go index 4f6314f5f6..d5c50fd3ee 100644 --- a/x/protocol/module.go +++ b/x/protocol/module.go @@ -162,6 +162,11 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { // panic:ok: at start up, migration cannot proceed anyhow panic(fmt.Errorf("%s: failed to register migration to v8: %w", types.ModuleName, err)) } + + if err := cfg.RegisterMigration(types.ModuleName, 8, migrator.MigrateVersion); err != nil { + // panic:ok: at start up, migration cannot proceed anyhow + panic(fmt.Errorf("%s: failed to register migration to v9: %w", types.ModuleName, err)) + } } // RegisterInvariants registers the capability module's invariants. @@ -186,7 +191,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw } // ConsensusVersion implements ConsensusVersion. -func (AppModule) ConsensusVersion() uint64 { return 8 } +func (AppModule) ConsensusVersion() uint64 { return 9 } // BeginBlock executes all ABCI BeginBlock logic respective to the capability module. func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) {