Some checks failed
CodeQL / Analyze (push) Waiting to run
golangci-lint / lint (push) Waiting to run
Tests / Code Coverage / build (amd64) (push) Waiting to run
Tests / Code Coverage / build (arm64) (push) Waiting to run
Tests / Code Coverage / unit-tests (map[additional-args:-tags="test_e2e" name:e2e path:./e2e]) (push) Waiting to run
Tests / Code Coverage / unit-tests (map[name:08-wasm path:./modules/light-clients/08-wasm]) (push) Waiting to run
Tests / Code Coverage / unit-tests (map[name:ibc-go path:.]) (push) Waiting to run
Docker Build & Push Simapp (main) / docker-build (push) Has been cancelled
27 lines
878 B
Go
27 lines
878 B
Go
package keeper
|
|
|
|
import (
|
|
sdk "git.cw.tr/mukan-network/mukan-sdk/types"
|
|
|
|
v10 "git.cw.tr/mukan-network/mukan-ibc/modules/core/04-channel/migrations/v10"
|
|
)
|
|
|
|
// Migrator is a struct for handling in-place store migrations.
|
|
type Migrator struct {
|
|
keeper *Keeper
|
|
}
|
|
|
|
// NewMigrator returns a new Migrator.
|
|
func NewMigrator(keeper *Keeper) Migrator {
|
|
return Migrator{keeper: keeper}
|
|
}
|
|
|
|
// Migrate7To8 migrates the channel store from module version 7 to 8 by:
|
|
// - Removing channel upgrade sequences
|
|
// - Removing any channel upgrade info (i.e. upgrades, counterparty upgrades, upgrade errors)
|
|
// - Removing channel params
|
|
// - Removing pruning sequences
|
|
// NOTE: This migration will fail if any channels are in the FLUSHING or FLUSHCOMPLETE state.
|
|
func (m *Migrator) Migrate7To8(ctx sdk.Context) error {
|
|
return v10.MigrateStore(ctx, m.keeper.storeService, m.keeper.cdc, m.keeper)
|
|
}
|