Skip to content

Commit

Permalink
Revert "migrations"
Browse files Browse the repository at this point in the history
This reverts commit f1e7c6a.
  • Loading branch information
stana-miric committed Nov 27, 2024
1 parent e9f7021 commit 1288a3f
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 92 deletions.
13 changes: 0 additions & 13 deletions x/ccv/provider/migrations/migrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
providerkeeper "github.com/cosmos/interchain-security/v6/x/ccv/provider/keeper"
v7 "github.com/cosmos/interchain-security/v6/x/ccv/provider/migrations/v7"
v8 "github.com/cosmos/interchain-security/v6/x/ccv/provider/migrations/v8"
v9 "github.com/cosmos/interchain-security/v6/x/ccv/provider/migrations/v9"
)

// Migrator is a struct for handling in-place store migrations.
Expand Down Expand Up @@ -97,15 +96,3 @@ func (m Migrator) Migrate7to8(ctx sdktypes.Context) error {

return nil
}

// Migrate8to9 migrates x/ccvprovider state from consensus version 8 to 9.
// The migration consists of the following actions:
// - insert infraction parameters for each consumer
func (m Migrator) Migrate8to9(ctx sdktypes.Context) error {
store := ctx.KVStore(m.storeKey)
if err := v9.MigrateConsumerInfractionParams(ctx, store, m.providerKeeper); err != nil {
return err
}

return nil
}
39 changes: 0 additions & 39 deletions x/ccv/provider/migrations/v9/migrations.go

This file was deleted.

35 changes: 0 additions & 35 deletions x/ccv/provider/migrations/v9/migrations_test.go

This file was deleted.

6 changes: 1 addition & 5 deletions x/ccv/provider/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,6 @@ func (am AppModule) RegisterServices(cfg module.Configurator) {
if err := cfg.RegisterMigration(providertypes.ModuleName, 7, migrator.Migrate7to8); err != nil {
panic(fmt.Sprintf("failed to register migrator for %s: %s -- from 7 -> 8", providertypes.ModuleName, err))
}
if err := cfg.RegisterMigration(providertypes.ModuleName, 8, migrator.Migrate8to9); err != nil {
panic(fmt.Sprintf("failed to register migrator for %s: %s -- from 8 -> 9", providertypes.ModuleName, err))
}

}

// InitGenesis performs genesis initialization for the provider module. It returns validator updates
Expand All @@ -172,7 +168,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
}

// ConsensusVersion implements AppModule/ConsensusVersion.
func (AppModule) ConsensusVersion() uint64 { return 9 }
func (AppModule) ConsensusVersion() uint64 { return 8 }

// BeginBlock implements the AppModule interface
func (am AppModule) BeginBlock(ctx context.Context) error {
Expand Down

0 comments on commit 1288a3f

Please sign in to comment.