Skip to content

Commit

Permalink
chore: set v21 upgrade version
Browse files Browse the repository at this point in the history
  • Loading branch information
gartnera committed Oct 28, 2024
1 parent 74d237b commit 3e8fdc7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions app/setup_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/zeta-chain/node/pkg/constant"
)

const releaseVersion = "v21"

func SetupHandlers(app *App) {
allUpgrades := upgradeTracker{
upgrades: []upgradeTrackerItem{
Expand Down Expand Up @@ -51,9 +51,9 @@ func SetupHandlers(app *App) {
}

app.UpgradeKeeper.SetUpgradeHandler(
constant.Version,
releaseVersion,
func(ctx sdk.Context, _ types.Plan, vm module.VersionMap) (module.VersionMap, error) {
app.Logger().Info("Running upgrade handler for " + constant.Version)
app.Logger().Info("Running upgrade handler for " + releaseVersion)

var err error
for _, upgradeHandler := range upgradeHandlerFns {
Expand All @@ -71,7 +71,7 @@ func SetupHandlers(app *App) {
if err != nil {
panic(err)
}
if upgradeInfo.Name == constant.Version && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
if upgradeInfo.Name == releaseVersion && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
// Use upgrade store loader for the initial loading of all stores when app starts,
// it checks if version == upgradeHeight and applies store upgrades before loading the stores,
// so that new stores start with the correct version (the current height of chain),
Expand Down
2 changes: 1 addition & 1 deletion contrib/localnet/scripts/start-upgrade-orchestrator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fi
# get new zetacored version
curl -L -o /tmp/zetacored.new "${ZETACORED_URL}"
chmod +x /tmp/zetacored.new
UPGRADE_NAME=$(/tmp/zetacored.new version)
UPGRADE_NAME="v21"

# if explicit upgrade height not provided, use dumb estimator
if [[ -z $UPGRADE_HEIGHT ]]; then
Expand Down

0 comments on commit 3e8fdc7

Please sign in to comment.