diff --git a/app/app.go b/app/app.go index 1230681d4..2e8c2709f 100644 --- a/app/app.go +++ b/app/app.go @@ -131,7 +131,6 @@ import ( "github.com/axelarnetwork/axelar-core/x/vote" voteKeeper "github.com/axelarnetwork/axelar-core/x/vote/keeper" voteTypes "github.com/axelarnetwork/axelar-core/x/vote/types" - "github.com/axelarnetwork/utils/funcs" // Override with generated statik docs _ "github.com/axelarnetwork/axelar-core/client/docs/statik" @@ -267,11 +266,6 @@ func NewAxelarApp( panic(fmt.Sprintf("failed to resolve absolute path for new wasm dir %s: %v", wasmDir, err)) } - // Migrate wasm dir from old path to new path - // TODO: Remove this once nodes have migrated - oldWasmDir := filepath.Join(homePath, "wasm") - funcs.MustNoErr(migrateWasmDir(oldWasmDir, wasmPath)) - SetKeeper(keepers, initWasmKeeper(encodingConfig, keys, keepers, bApp, appOpts, wasmOpts, wasmPath)) SetKeeper(keepers, initWasmContractKeeper(keepers)) @@ -465,25 +459,6 @@ func initMessageRouter(keepers *KeeperCache) nexusTypes.MessageRouter { return messageRouter } -func migrateWasmDir(oldWasmDir, newWasmDir string) error { - // If the new wasm dir exists, there's nothing to do - if _, err := os.Stat(newWasmDir); err == nil { - return nil - } - - // If the old wasm dir doesn't exist, there's nothing to do - if _, err := os.Stat(oldWasmDir); err != nil && os.IsNotExist(err) { - return nil - } - - // Move the wasm dir from old path to new path - if err := os.Rename(oldWasmDir, newWasmDir); err != nil { - return fmt.Errorf("failed to move wasm directory from %s to %s: %v", oldWasmDir, newWasmDir, err) - } - - return nil -} - func (app *AxelarApp) registerWasmSnapshotExtension(keepers *KeeperCache) { // Register wasm snapshot extension to enable state-sync compatibility for wasm. // MUST be done before loading the version