Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create the (empty) umber-rc2 upgrade. #2069

Merged
merged 5 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ Ref: https://keepachangelog.com/en/1.0.0/

## [Unreleased]

### Improvements

* Add the (empty) `umber-rc2` upgrade [#2069](https://github.com/provenance-io/provenance/pull/2069).

### Dependencies

- Bump `github.com/hashicorp/go-getter` from 1.7.4 to 1.7.5 ([#2057](https://github.com/provenance-io/provenance/pull/2057))
Expand Down
3 changes: 2 additions & 1 deletion app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ type appUpgrade struct {
// If something is happening in the rc upgrade(s) that isn't being applied in the non-rc,
// or vice versa, please add comments explaining why in both entries.
var upgrades = map[string]appUpgrade{
"umber-rc1": { // upgrade for v1.19.0-rc1
"umber-rc1": { // upgrade for v1.19.0-rc2
Added: []string{crisistypes.ModuleName, circuittypes.ModuleName, consensusparamtypes.ModuleName},
Deleted: []string{"reward"},
Handler: func(ctx sdk.Context, app *App, vm module.VersionMap) (module.VersionMap, error) {
Expand Down Expand Up @@ -105,6 +105,7 @@ var upgrades = map[string]appUpgrade{
return vm, nil
},
},
"umber-rc2": {}, // upgrade for v1.19.0-rc3
"umber": { // upgrade for v1.19.0
Added: []string{crisistypes.ModuleName, circuittypes.ModuleName, consensusparamtypes.ModuleName},
Deleted: []string{"reward"},
Expand Down
12 changes: 12 additions & 0 deletions app/upgrades_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,18 @@ func (s *UpgradeTestSuite) TestUmberRC1() {
s.AssertUpgradeHandlerLogs("umber-rc1", expInLog, nil)
}

func (s *UpgradeTestSuite) TestUmberRC2() {
key := "umber-rc2"
s.Assert().Contains(upgrades, key, "%q defined upgrades map", key)

entry := upgrades[key]
s.Assert().NotNil(entry, "%q entry in the upgrades map", key)
s.Assert().Empty(entry.Added, "%q.Added", key)
s.Assert().Empty(entry.Deleted, "%q.Deleted", key)
s.Assert().Empty(entry.Renamed, "%q.Renamed", key)
s.Assert().Nil(entry.Handler, "%q.Handler", key)
}

func (s *UpgradeTestSuite) TestUmber() {
expInLog := []string{
"INF Pruning expired consensus states for IBC.",
Expand Down
Loading