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

Drop patch number from upgrade name, v7.0.0 to v7.0 (backport #2512) #2515

Merged
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
12 changes: 6 additions & 6 deletions protocol/app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package app
import (
"fmt"

v7_0_0 "github.com/dydxprotocol/v4-chain/protocol/app/upgrades/v7.0.0"
v7_0 "github.com/dydxprotocol/v4-chain/protocol/app/upgrades/v7.0"

upgradetypes "cosmossdk.io/x/upgrade/types"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand All @@ -14,20 +14,20 @@ var (
// `Upgrades` defines the upgrade handlers and store loaders for the application.
// New upgrades should be added to this slice after they are implemented.
Upgrades = []upgrades.Upgrade{
v7_0_0.Upgrade,
v7_0.Upgrade,
}
Forks = []upgrades.Fork{}
)

// setupUpgradeHandlers registers the upgrade handlers to perform custom upgrade
// logic and state migrations for software upgrades.
func (app *App) setupUpgradeHandlers() {
if app.UpgradeKeeper.HasHandler(v7_0_0.UpgradeName) {
panic(fmt.Sprintf("Cannot register duplicate upgrade handler '%s'", v7_0_0.UpgradeName))
if app.UpgradeKeeper.HasHandler(v7_0.UpgradeName) {
panic(fmt.Sprintf("Cannot register duplicate upgrade handler '%s'", v7_0.UpgradeName))
}
app.UpgradeKeeper.SetUpgradeHandler(
v7_0_0.UpgradeName,
v7_0_0.CreateUpgradeHandler(
v7_0.UpgradeName,
v7_0.CreateUpgradeHandler(
app.ModuleManager,
app.configurator,
app.AccountKeeper,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v_7_0_0
package v_7_0

import (
store "cosmossdk.io/store/types"
Expand All @@ -7,7 +7,7 @@ import (
)

const (
UpgradeName = "v7.0.0"
UpgradeName = "v7.0"
)

var Upgrade = upgrades.Upgrade{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v_7_0_0
package v_7_0

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//go:build all || container_test

package v_7_0_0_test
package v_7_0_test

import (
"math/big"
Expand All @@ -11,7 +11,7 @@ import (
"github.com/cosmos/gogoproto/proto"

authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
v_7_0_0 "github.com/dydxprotocol/v4-chain/protocol/app/upgrades/v7.0.0"
v_7_0 "github.com/dydxprotocol/v4-chain/protocol/app/upgrades/v7.0"
"github.com/dydxprotocol/v4-chain/protocol/dtypes"
"github.com/dydxprotocol/v4-chain/protocol/testing/containertest"
"github.com/dydxprotocol/v4-chain/protocol/testutil/constants"
Expand All @@ -38,7 +38,7 @@ func TestStateUpgrade(t *testing.T) {
preUpgradeSetups(node, t)
preUpgradeChecks(node, t)

err = containertest.UpgradeTestnet(nodeAddress, t, node, v_7_0_0.UpgradeName)
err = containertest.UpgradeTestnet(nodeAddress, t, node, v_7_0.UpgradeName)
require.NoError(t, err)

postUpgradeChecks(node, t)
Expand Down
2 changes: 1 addition & 1 deletion protocol/testing/version/VERSION_CURRENT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v7.0.0
v7.0
Loading