Skip to content

Commit

Permalink
Drop patch number from upgrade name, v7.0.0 to v7.0 (#2512)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamfraser authored Oct 18, 2024
1 parent 0f8efed commit 66d7a5d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
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

0 comments on commit 66d7a5d

Please sign in to comment.