From d3be301414f3fd4b1202003d2742d53b133329e9 Mon Sep 17 00:00:00 2001 From: rapha Date: Wed, 22 May 2024 16:40:36 +0200 Subject: [PATCH] fix: migration --- app/upgrades/v1_5/v1_4_bundles_types/params.pb.go | 6 ------ app/upgrades/v1_5/v1_4_pool_types/getters_pool.go | 4 +++- app/upgrades/v1_5/v1_4_pool_types/pool.pb.go | 9 --------- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/app/upgrades/v1_5/v1_4_bundles_types/params.pb.go b/app/upgrades/v1_5/v1_4_bundles_types/params.pb.go index 2789934c..7e2bf419 100644 --- a/app/upgrades/v1_5/v1_4_bundles_types/params.pb.go +++ b/app/upgrades/v1_5/v1_4_bundles_types/params.pb.go @@ -83,12 +83,6 @@ func (m *Params) GetMaxPoints() uint64 { return 0 } -func init() { - proto.RegisterType((*Params)(nil), "kyve.bundles.v1beta1.Params") -} - -func init() { proto.RegisterFile("kyve/bundles/v1beta1/params.proto", fileDescriptor_cfd3a74b72a01aaa) } - var fileDescriptor_cfd3a74b72a01aaa = []byte{ // 300 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0xc1, 0x4a, 0xf3, 0x40, diff --git a/app/upgrades/v1_5/v1_4_pool_types/getters_pool.go b/app/upgrades/v1_5/v1_4_pool_types/getters_pool.go index 03700857..3118654e 100644 --- a/app/upgrades/v1_5/v1_4_pool_types/getters_pool.go +++ b/app/upgrades/v1_5/v1_4_pool_types/getters_pool.go @@ -1,14 +1,16 @@ package v1_4_pool_types import ( + "cosmossdk.io/store/prefix" storetypes "cosmossdk.io/store/types" + "github.com/KYVENetwork/chain/x/pool/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" ) // GetAllPools returns all pools func GetAllPools(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.Codec) (list []Pool) { - store := ctx.KVStore(storeKey) + store := prefix.NewStore(ctx.KVStore(storeKey), types.PoolKey) iterator := storetypes.KVStorePrefixIterator(store, []byte{}) defer iterator.Close() diff --git a/app/upgrades/v1_5/v1_4_pool_types/pool.pb.go b/app/upgrades/v1_5/v1_4_pool_types/pool.pb.go index 26b2ca5c..3e6b70e6 100644 --- a/app/upgrades/v1_5/v1_4_pool_types/pool.pb.go +++ b/app/upgrades/v1_5/v1_4_pool_types/pool.pb.go @@ -446,15 +446,6 @@ func (m *Pool) GetEndKey() string { return "" } -func init() { - proto.RegisterEnum("kyve.pool.v1beta1.PoolStatus", PoolStatus_name, PoolStatus_value) - proto.RegisterType((*Protocol)(nil), "kyve.pool.v1beta1.Protocol") - proto.RegisterType((*UpgradePlan)(nil), "kyve.pool.v1beta1.UpgradePlan") - proto.RegisterType((*Pool)(nil), "kyve.pool.v1beta1.Pool") -} - -func init() { proto.RegisterFile("kyve/pool/v1beta1/pool.proto", fileDescriptor_40c1730f47ff2ef8) } - var fileDescriptor_40c1730f47ff2ef8 = []byte{ // 820 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x41, 0x6f, 0xdb, 0x36,