From d4865a5393edbe86b53ecc7171ff88994fcb4db2 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 20 Jan 2023 11:00:37 -0800 Subject: [PATCH] feat: register rc4 upgrade (#1729) (#1731) ## Description Registers the rc4 upgrade handler for the canon-2 testnet upgrade. --- ### Author Checklist _All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues._ I have... - [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change - [ ] added appropriate labels to the PR - [ ] targeted the correct branch (see [PR Targeting](https://github.com/umee-network/umee/blob/main/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist _All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items._ I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable) (cherry picked from commit 0627615d6fb74fcd7d1bf45945f0db1f15e5043c) Co-authored-by: Adam Wozniak <29418299+adamewozniak@users.noreply.github.com> --- app/upgrades.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/upgrades.go b/app/upgrades.go index 3ded2a960a..398b317482 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -33,6 +33,18 @@ func (app UmeeApp) RegisterUpgradeHandlers(bool) { app.registerUpgrade3_2to3_3(upgradeInfo) app.registerUpgrade3_3to4_0(upgradeInfo) app.registerUpgrade4_0to4_0rc3(upgradeInfo) + app.registerUpgrade4_0rc3to4_0rc4(upgradeInfo) +} + +// performs upgrade from v4.0-rc3 -> v4.0-rc4 +func (app UmeeApp) registerUpgrade4_0rc3to4_0rc4(_ upgradetypes.Plan) { + const planName = "v4.0-rc4" + app.UpgradeKeeper.SetUpgradeHandler( + planName, + func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + ctx.Logger().Info("Upgrade handler execution", "name", planName) + return fromVM, nil + }) } // performs upgrade from v4.0-rc2 (or rc1) -> v4.0-rc3