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

added empty upgrade handler for 2.0.2 #412

Merged
merged 2 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
10 changes: 6 additions & 4 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ import (
"github.com/neutron-org/neutron/v2/docs"

"github.com/neutron-org/neutron/v2/app/upgrades"
v030 "github.com/neutron-org/neutron/v2/app/upgrades/v0.3.0"
v044 "github.com/neutron-org/neutron/v2/app/upgrades/v0.4.4"
v200 "github.com/neutron-org/neutron/v2/app/upgrades/v2.0.0"
"github.com/neutron-org/neutron/v2/app/upgrades/v0.3.0"
"github.com/neutron-org/neutron/v2/app/upgrades/v0.4.4"
"github.com/neutron-org/neutron/v2/app/upgrades/v2.0.0"
"github.com/neutron-org/neutron/v2/app/upgrades/v2.0.2"

"github.com/neutron-org/neutron/v2/x/cron"

"github.com/CosmWasm/wasmd/x/wasm"
Expand Down Expand Up @@ -166,7 +168,7 @@ const (
)

var (
Upgrades = []upgrades.Upgrade{v030.Upgrade, v044.Upgrade, v200.Upgrade}
Upgrades = []upgrades.Upgrade{v030.Upgrade, v044.Upgrade, v200.Upgrade, v202.Upgrade}

// DefaultNodeHome default home directories for the application daemon
DefaultNodeHome string
Expand Down
15 changes: 15 additions & 0 deletions app/upgrades/v2.0.2/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package v202

import (
"github.com/neutron-org/neutron/v2/app/upgrades"
)

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

var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: CreateUpgradeHandler,
}
24 changes: 24 additions & 0 deletions app/upgrades/v2.0.2/upgrades.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package v202

import (
"fmt"

"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
"github.com/neutron-org/neutron/v2/app/upgrades"
)

func CreateUpgradeHandler(
_ *module.Manager,
_ module.Configurator,
_ *upgrades.UpgradeKeepers,
_ upgrades.StoreKeys,
_ codec.Codec,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
ctx.Logger().Info(fmt.Sprintf("Empty migration {%s} applied", UpgradeName))
return vm, nil
}
}
Loading