Skip to content

Commit

Permalink
fix: Added recommended store loader conditionals
Browse files Browse the repository at this point in the history
  • Loading branch information
Eengineer1 committed Mar 27, 2024
1 parent d72ac52 commit 588d17d
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -1038,14 +1038,17 @@ func (app *App) setupUpgradeStoreLoaders() {
return
}

storeUpgrades := storetypes.StoreUpgrades{
Added: []string{
consensusparamtypes.ModuleName,
crisistypes.ModuleName,
ibcfeetypes.ModuleName,
},
if upgradeInfo.Name == upgradeV2.UpgradeName && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
storeUpgrades := storetypes.StoreUpgrades{
Added: []string{
consensusparamtypes.StoreKey,
crisistypes.StoreKey,
},
}

// configure store loader that checks if version == upgradeHeight and applies store upgrades
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades))
}
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades))
}

func (app *App) RegisterUpgradeHandlers() {
Expand Down

0 comments on commit 588d17d

Please sign in to comment.