-
Notifications
You must be signed in to change notification settings - Fork 0
/
store.go
22 lines (18 loc) · 868 Bytes
/
store.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package v043
import (
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
v043distribution "github.com/incubus-network/fanfury-sdk/v2/x/lsnative/distribution/migrations/v043"
v042slashing "github.com/incubus-network/fanfury-sdk/v2/x/lsnative/slashing/migrations/v042"
)
// MigrateStore performs in-place store migrations from v0.40 to v0.43. The
// migration includes:
//
// - Change addresses to be length-prefixed.
func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey) error {
store := ctx.KVStore(storeKey)
v043distribution.MigratePrefixAddress(store, v042slashing.ValidatorSigningInfoKeyPrefix)
v043distribution.MigratePrefixAddressBytes(store, v042slashing.ValidatorMissedBlockBitArrayKeyPrefix)
v043distribution.MigratePrefixAddress(store, v042slashing.AddrPubkeyRelationKeyPrefix)
return nil
}