From a40d23dbc30e8051866d6cc877428174dca11dec Mon Sep 17 00:00:00 2001 From: Ajaz Ahmed Ansari Date: Wed, 15 Mar 2023 23:04:24 +0530 Subject: [PATCH 1/2] refactor upgrade handler --- app/upgrades.go | 6 +++--- app/upgrades_test.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/upgrades.go b/app/upgrades.go index 7880da2b0..b5e0232d1 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -18,14 +18,14 @@ const ( DevnetChainID = "quicktest-1" v010204UpgradeName = "v1.2.4" - v010205UpgradeName = "v1.2.5" + v010207UpgradeName = "v1.2.7" v010300UpgradeName = "v1.3.0" // retained for testy ) func setUpgradeHandlers(app *Quicksilver) { app.UpgradeKeeper.SetUpgradeHandler(v010300UpgradeName, noOpUpgradeHandler(app)) // retained for testy app.UpgradeKeeper.SetUpgradeHandler(v010204UpgradeName, v010204UpgradeHandler(app)) - app.UpgradeKeeper.SetUpgradeHandler(v010205UpgradeName, v010205UpgradeHandler(app)) + app.UpgradeKeeper.SetUpgradeHandler(v010207UpgradeName, v010207UpgradeHandler(app)) // 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 @@ -83,7 +83,7 @@ func v010204UpgradeHandler(app *Quicksilver) upgradetypes.UpgradeHandler { } } -func v010205UpgradeHandler(app *Quicksilver) upgradetypes.UpgradeHandler { +func v010207UpgradeHandler(app *Quicksilver) upgradetypes.UpgradeHandler { return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { // update minter epoch-provisions minter := app.MintKeeper.GetMinter(ctx) diff --git a/app/upgrades_test.go b/app/upgrades_test.go index 468f48c88..643528047 100644 --- a/app/upgrades_test.go +++ b/app/upgrades_test.go @@ -278,9 +278,9 @@ func (suite *AppTestSuite) initTestZone() { } } -func (s *AppTestSuite) TestV010205UpgradeHandler() { +func (s *AppTestSuite) TestV010207UpgradeHandler() { app := s.GetQuicksilverApp(s.chainA) - handler := v010205UpgradeHandler(app) + handler := v010207UpgradeHandler(app) ctx := s.chainA.GetContext() expectedVal := sdk.NewDec(50_000_000_000_000).Quo(sdk.NewDec(365)) From 338cd6f1725a7d59e2c43c23ccdc837fcfa80bbe Mon Sep 17 00:00:00 2001 From: Ajaz Ahmed Ansari Date: Wed, 15 Mar 2023 23:07:03 +0530 Subject: [PATCH 2/2] add changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 735fd8b0f..2f82667e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Released +### v1.2.7 +- fix upgrade handler + ### v1.2.6 - fix release height