Skip to content

Commit

Permalink
✨ Setup upgrade handler for v4.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Nov 8, 2023
1 parent 86bf2cf commit 35038cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## [unreleased]
- Fix missing upgrade handler for 4.1.x upgrade

## [v4.1.0](https://github.com/likecoin/likecoin-chain/releases/v4.1.0)
- Upgrade cosmovisor included in docker image to 1.5.0
Expand Down
16 changes: 1 addition & 15 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ import (
)

const (
UpgradeName = "v4.0.0"
UpgradeName = "v4.1.1"
)

var (
Expand Down Expand Up @@ -344,7 +344,6 @@ func NewLikeApp(
skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath,
app.BaseApp, authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)
app.setupUpgradeStoreLoaders()
app.registerUpgradeHandlers()
app.IscnKeeper = iscnkeeper.NewKeeper(appCodec, keys[iscntypes.StoreKey], app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, iscnSubspace)

Expand Down Expand Up @@ -573,19 +572,6 @@ func (app *LikeApp) registerUpgradeHandlers() {
})
}

func (app *LikeApp) setupUpgradeStoreLoaders() {
upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk()
if err != nil {
panic(err)
}
if upgradeInfo.Name == UpgradeName && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
storeUpgrades := storetypes.StoreUpgrades{
Added: []string{"group"},
}
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades))
}
}

func (app *LikeApp) Name() string {
return app.BaseApp.Name()
}
Expand Down

0 comments on commit 35038cd

Please sign in to comment.