github.com/cosmos/cosmos-sdk@v0.50.10/x/slashing/migrations/v2/store.go (about) 1 package v2 2 3 import ( 4 "context" 5 6 storetypes "cosmossdk.io/core/store" 7 8 "github.com/cosmos/cosmos-sdk/runtime" 9 v2distribution "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v2" 10 v1 "github.com/cosmos/cosmos-sdk/x/slashing/migrations/v1" 11 ) 12 13 // MigrateStore performs in-place store migrations from v0.40 to v0.43. The 14 // migration includes: 15 // 16 // - Change addresses to be length-prefixed. 17 func MigrateStore(ctx context.Context, storeService storetypes.KVStoreService) error { 18 store := runtime.KVStoreAdapter(storeService.OpenKVStore(ctx)) 19 v2distribution.MigratePrefixAddress(store, v1.ValidatorSigningInfoKeyPrefix) 20 v2distribution.MigratePrefixAddressBytes(store, v1.ValidatorMissedBlockBitArrayKeyPrefix) 21 v2distribution.MigratePrefixAddress(store, v1.AddrPubkeyRelationKeyPrefix) 22 23 return nil 24 }