github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/libs/ibc-go/modules/core/keeper/migrations.go (about)

     1  package keeper
     2  
     3  import (
     4  	sdk "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/types"
     5  	//clientkeeper "github.com/fibonacci-chain/fbc/libs/ibc-go/modules/core/02-client/keeper"
     6  )
     7  
     8  // Migrator is a struct for handling in-place store migrations.
     9  type Migrator struct {
    10  	keeper Keeper
    11  }
    12  
    13  // NewMigrator returns a new Migrator.
    14  func NewMigrator(keeper Keeper) Migrator {
    15  	return Migrator{keeper: keeper}
    16  }
    17  
    18  // Migrate1to2 migrates from version 1 to 2.
    19  // This migration prunes:
    20  // - migrates solo machine client state from protobuf definition v1 to v2
    21  // - prunes solo machine consensus states
    22  // - prunes expired tendermint consensus states
    23  // - adds ProcessedHeight and Iteration keys for unexpired tendermint consensus states
    24  func (m Migrator) Migrate1to2(ctx sdk.Context) error {
    25  	// Ywmet todo
    26  	// clientMigrator := clientkeeper.NewMigrator(m.keeper.ClientKeeper)
    27  	// if err := clientMigrator.Migrate1to2(ctx); err != nil {
    28  	// 	return err
    29  	// }
    30  
    31  	return nil
    32  }