From 04ed4537c6ac2a9c962ceb02694ce2a0d9d39ebb Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 4 Nov 2022 18:59:32 +0100 Subject: [PATCH] group migration should be in #13742 --- x/group/keeper/migrations.go | 21 --------------------- x/group/migrations/v2/migrate.go | 17 ----------------- x/group/migrations/v2/migrator_test.go | 14 -------------- x/group/module/module.go | 6 ------ 4 files changed, 58 deletions(-) delete mode 100644 x/group/keeper/migrations.go delete mode 100644 x/group/migrations/v2/migrate.go delete mode 100644 x/group/migrations/v2/migrator_test.go diff --git a/x/group/keeper/migrations.go b/x/group/keeper/migrations.go deleted file mode 100644 index e1457eab3497..000000000000 --- a/x/group/keeper/migrations.go +++ /dev/null @@ -1,21 +0,0 @@ -package keeper - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - v2 "github.com/cosmos/cosmos-sdk/x/group/migrations/v2" -) - -// 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} -} - -// Migrate1to2 migrates from version 1 to 2. -func (m Migrator) Migrate1to2(ctx sdk.Context) error { - return v2.Migrate(ctx, ctx.KVStore(m.keeper.key), m.keeper.cdc) -} diff --git a/x/group/migrations/v2/migrate.go b/x/group/migrations/v2/migrate.go deleted file mode 100644 index 74046bc7c661..000000000000 --- a/x/group/migrations/v2/migrate.go +++ /dev/null @@ -1,17 +0,0 @@ -package v2 - -import ( - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -const ( - ModuleName = "group" -) - -// Migrate migrates the x/group module state from the consensus version 1 to -// version 2. Specifically, it modify the group policy module account and removes their name. -func Migrate(ctx sdk.Context, store sdk.KVStore, cdc codec.Codec) error { - - return nil -} diff --git a/x/group/migrations/v2/migrator_test.go b/x/group/migrations/v2/migrator_test.go deleted file mode 100644 index 39709d1bcb05..000000000000 --- a/x/group/migrations/v2/migrator_test.go +++ /dev/null @@ -1,14 +0,0 @@ -package v2_test - -import ( - "testing" - - moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - groupmodule "github.com/cosmos/cosmos-sdk/x/group/module" -) - -func TestMigrate(t *testing.T) { - encCfg := moduletestutil.MakeTestEncodingConfig(groupmodule.AppModuleBasic{}) - _ = encCfg.Codec - -} diff --git a/x/group/module/module.go b/x/group/module/module.go index 775ec1b008c0..89fe103a6c44 100644 --- a/x/group/module/module.go +++ b/x/group/module/module.go @@ -22,7 +22,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/cosmos/cosmos-sdk/x/group" "github.com/cosmos/cosmos-sdk/x/group/client/cli" "github.com/cosmos/cosmos-sdk/x/group/keeper" @@ -138,11 +137,6 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw func (am AppModule) RegisterServices(cfg module.Configurator) { group.RegisterMsgServer(cfg.MsgServer(), am.keeper) group.RegisterQueryServer(cfg.QueryServer(), am.keeper) - - m := keeper.NewMigrator(am.keeper) - if err := cfg.RegisterMigration(types.ModuleName, 1, m.Migrate1to2); err != nil { - panic(fmt.Sprintf("failed to migrate x/%s from version 1 to 2: %v", types.ModuleName, err)) - } } // ConsensusVersion implements AppModule/ConsensusVersion.