Skip to content

Commit

Permalink
Merge pull request #181 from realiotech/change-upgrade-folder
Browse files Browse the repository at this point in the history
style: change upgrade folder naming
  • Loading branch information
catShaark authored Nov 27, 2024
2 parents 1712d96 + 5974916 commit 5e4bbf1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

storetypes "cosmossdk.io/store/types"
"github.com/realiotech/realio-network/app/upgrades/commission"
v2 "github.com/realiotech/realio-network/app/upgrades/v2"
v1 "github.com/realiotech/realio-network/app/upgrades/v1"

upgradetypes "cosmossdk.io/x/upgrade/types"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down Expand Up @@ -49,8 +49,8 @@ func (app *RealioNetwork) setupUpgradeHandlers() {
)

app.UpgradeKeeper.SetUpgradeHandler(
v2.UpgradeName,
v2.CreateUpgradeHandler(
v1.UpgradeName,
v1.CreateUpgradeHandler(
app.mm,
app.configurator,
app.ParamsKeeper,
Expand All @@ -73,7 +73,7 @@ func (app *RealioNetwork) setupUpgradeHandlers() {
return
}

if upgradeInfo.Name == v2.UpgradeName && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &v2.V2StoreUpgrades))
if upgradeInfo.Name == v1.UpgradeName && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &v1.V1StoreUpgrades))
}
}
6 changes: 3 additions & 3 deletions app/upgrades/v2/constants.go → app/upgrades/v1/constants.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v2
package v1

import (
storetypes "cosmossdk.io/store/types"
Expand All @@ -9,10 +9,10 @@ import (

const (
// UpgradeName defines the on-chain upgrade name.
UpgradeName = "v2"
UpgradeName = "v1"
)

var V2StoreUpgrades = storetypes.StoreUpgrades{
var V1StoreUpgrades = storetypes.StoreUpgrades{
Added: []string{
consensustypes.ModuleName,
crisistypes.ModuleName,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v2
package v1

import (
"context"
Expand Down

0 comments on commit 5e4bbf1

Please sign in to comment.