Skip to content

Commit

Permalink
migration modified
Browse files Browse the repository at this point in the history
  • Loading branch information
cgsingh33 committed May 31, 2023
1 parent 14460a1 commit 4e02f40
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 53 deletions.
17 changes: 0 additions & 17 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,6 @@ import (
liquiditytypes "github.com/comdex-official/comdex/x/liquidity/types"

cwasm "github.com/comdex-official/comdex/app/wasm"

tv12 "github.com/comdex-official/comdex/app/upgrades/testnet/v12"
)

const (
Expand Down Expand Up @@ -1219,14 +1217,6 @@ func (a *App) registerUpgradeHandlers() {
panic(err)
}

switch {
case upgradeInfo.Name == tv12.UpgradeName:
a.UpgradeKeeper.SetUpgradeHandler(
tv12.UpgradeName,
tv12.CreateUpgradeHandlerV12(a.mm, a.configurator),
)
}

var storeUpgrades *storetypes.StoreUpgrades

storeUpgrades = upgradeHandlers(upgradeInfo, a, storeUpgrades)
Expand All @@ -1238,13 +1228,6 @@ func (a *App) registerUpgradeHandlers() {
}

func upgradeHandlers(upgradeInfo storetypes.UpgradeInfo, a *App, storeUpgrades *storetypes.StoreUpgrades) *storetypes.StoreUpgrades {
switch {

case upgradeInfo.Name == tv12.UpgradeName && !a.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height):
storeUpgrades = &storetypes.StoreUpgrades{
Added: []string{},
}
}

return storeUpgrades
}
15 changes: 0 additions & 15 deletions app/upgrades/testnet/v12/constants.go

This file was deleted.

18 changes: 0 additions & 18 deletions app/upgrades/testnet/v12/upgrades.go

This file was deleted.

1 change: 0 additions & 1 deletion cmd/comdex/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
packetforwardtypes "github.com/strangelove-ventures/packet-forward-middleware/v4/router/types"
)

// Migrate migrates exported state from v0.40 to a v0.43 genesis state.
func Migrate(appState types.AppMap, clientCtx client.Context) types.AppMap {
// Migrate packetfowardmiddleware.
if appState["packetfowardmiddleware"] != nil {
Expand Down
4 changes: 2 additions & 2 deletions cmd/comdex/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const flagGenesisTime = "genesis-time"
const chainUpgradeGuide = "https://docs.cosmos.network/master/migrations/chain-upgrade-guide-040.html"

var migrationMap = types.MigrationMap{
"v12.0": Migrate,
"v11.1.0": Migrate,
}

// GetMigrationCallback returns a MigrationCallback for a given version.
Expand All @@ -35,7 +35,7 @@ func MigrateStoreCmd() *cobra.Command {
Long: fmt.Sprintf(`Migrate the source genesis into the target version and print to STDOUT.
Example:
$ %s migrate v0.36 /path/to/genesis.json --chain-id=cosmoshub-3 --genesis-time=2019-04-22T17:00:00Z
$ %s migrate v11.1.0 /path/to/genesis.json --chain-id=test-2 --genesis-time=2019-04-22T17:00:00Z
`, version.AppName),
Args: cobra.ExactArgs(2),
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down

0 comments on commit 4e02f40

Please sign in to comment.