From 5581d7506b5a31c2c4ff0a53824b6116e76530e7 Mon Sep 17 00:00:00 2001 From: Olimdzhon Date: Fri, 26 Jul 2024 14:09:59 +0500 Subject: [PATCH] fixed nil SystemInfo --- api/checkers/checkers/genesis.pulsar.go | 52 ++++++++-------- api/checkers/checkers/module/module.pulsar.go | 9 ++- api/checkers/checkers/params.pulsar.go | 9 ++- api/checkers/checkers/query.pulsar.go | 9 ++- api/checkers/checkers/query_grpc.pb.go | 1 - api/checkers/checkers/stored_game.pulsar.go | 7 +-- api/checkers/checkers/system_info.pulsar.go | 7 +-- api/checkers/checkers/tx.pulsar.go | 9 ++- api/checkers/checkers/tx_grpc.pb.go | 1 - x/checkers/module/genesis.go | 7 +-- x/checkers/module/genesis_test.go | 2 +- x/checkers/types/genesis.go | 4 +- x/checkers/types/genesis.pb.go | 61 ++++++++----------- x/checkers/types/genesis_test.go | 2 +- x/checkers/types/params.pb.go | 7 +-- x/checkers/types/query.pb.go | 7 +-- x/checkers/types/stored_game.pb.go | 3 +- x/checkers/types/system_info.pb.go | 3 +- x/checkers/types/tx.pb.go | 7 +-- 19 files changed, 94 insertions(+), 113 deletions(-) diff --git a/api/checkers/checkers/genesis.pulsar.go b/api/checkers/checkers/genesis.pulsar.go index c9c151f..763a709 100644 --- a/api/checkers/checkers/genesis.pulsar.go +++ b/api/checkers/checkers/genesis.pulsar.go @@ -2,17 +2,16 @@ package checkers import ( - fmt "fmt" - io "io" - reflect "reflect" - sync "sync" - _ "cosmossdk.io/api/amino" + fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" ) var _ protoreflect.List = (*_GenesisState_3_list)(nil) @@ -748,33 +747,34 @@ var file_checkers_checkers_genesis_proto_rawDesc = []byte{ 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x5f, 0x67, 0x61, 0x6d, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd8, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xde, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x3d, 0x0a, 0x0a, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x43, 0x0a, 0x0a, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x2e, 0x53, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x73, 0x79, 0x73, 0x74, 0x65, - 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4b, 0x0a, 0x0e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x47, - 0x61, 0x6d, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, - 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x47, 0x61, 0x6d, 0x65, 0x42, 0x04, 0xc8, 0xde, - 0x1f, 0x00, 0x52, 0x0e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x47, 0x61, 0x6d, 0x65, 0x4c, 0x69, - 0x73, 0x74, 0x42, 0xbf, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, - 0x65, 0x72, 0x73, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x42, 0x0c, 0x47, 0x65, - 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6c, 0x69, 0x6d, 0x64, 0x7a, 0x68, - 0x6f, 0x6e, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, - 0x73, 0xa2, 0x02, 0x03, 0x43, 0x43, 0x58, 0xaa, 0x02, 0x11, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, - 0x72, 0x73, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, 0xca, 0x02, 0x11, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x5c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, 0xe2, - 0x02, 0x1d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x5c, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x65, 0x72, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x12, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x3a, 0x3a, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x65, 0x72, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, + 0x0a, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4b, 0x0a, 0x0e, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x64, 0x47, 0x61, 0x6d, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x2e, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x47, 0x61, + 0x6d, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, + 0x47, 0x61, 0x6d, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x42, 0xbf, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, + 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, + 0x72, 0x73, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, + 0x6c, 0x69, 0x6d, 0x64, 0x7a, 0x68, 0x6f, 0x6e, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, + 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x2f, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, 0xa2, 0x02, 0x03, 0x43, 0x43, 0x58, 0xaa, 0x02, 0x11, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, + 0x73, 0xca, 0x02, 0x11, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x5c, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x65, 0x72, 0x73, 0xe2, 0x02, 0x1d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, + 0x5c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, + 0x3a, 0x3a, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/api/checkers/checkers/module/module.pulsar.go b/api/checkers/checkers/module/module.pulsar.go index 59ec3c0..da49594 100644 --- a/api/checkers/checkers/module/module.pulsar.go +++ b/api/checkers/checkers/module/module.pulsar.go @@ -2,16 +2,15 @@ package module import ( - fmt "fmt" - io "io" - reflect "reflect" - sync "sync" - _ "cosmossdk.io/api/cosmos/app/v1alpha1" + fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" ) var ( diff --git a/api/checkers/checkers/params.pulsar.go b/api/checkers/checkers/params.pulsar.go index 92ebce6..1cebc9a 100644 --- a/api/checkers/checkers/params.pulsar.go +++ b/api/checkers/checkers/params.pulsar.go @@ -2,17 +2,16 @@ package checkers import ( - fmt "fmt" - io "io" - reflect "reflect" - sync "sync" - _ "cosmossdk.io/api/amino" + fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" ) var ( diff --git a/api/checkers/checkers/query.pulsar.go b/api/checkers/checkers/query.pulsar.go index ed4d6fd..582a8aa 100644 --- a/api/checkers/checkers/query.pulsar.go +++ b/api/checkers/checkers/query.pulsar.go @@ -2,19 +2,18 @@ package checkers import ( - fmt "fmt" - io "io" - reflect "reflect" - sync "sync" - _ "cosmossdk.io/api/amino" v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" + fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" ) var ( diff --git a/api/checkers/checkers/query_grpc.pb.go b/api/checkers/checkers/query_grpc.pb.go index f570ea9..e33ba9a 100644 --- a/api/checkers/checkers/query_grpc.pb.go +++ b/api/checkers/checkers/query_grpc.pb.go @@ -8,7 +8,6 @@ package checkers import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/api/checkers/checkers/stored_game.pulsar.go b/api/checkers/checkers/stored_game.pulsar.go index b3106ad..da0c515 100644 --- a/api/checkers/checkers/stored_game.pulsar.go +++ b/api/checkers/checkers/stored_game.pulsar.go @@ -3,14 +3,13 @@ package checkers import ( fmt "fmt" - io "io" - reflect "reflect" - sync "sync" - runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" ) var ( diff --git a/api/checkers/checkers/system_info.pulsar.go b/api/checkers/checkers/system_info.pulsar.go index eface86..4ea584a 100644 --- a/api/checkers/checkers/system_info.pulsar.go +++ b/api/checkers/checkers/system_info.pulsar.go @@ -3,14 +3,13 @@ package checkers import ( fmt "fmt" - io "io" - reflect "reflect" - sync "sync" - runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" ) var ( diff --git a/api/checkers/checkers/tx.pulsar.go b/api/checkers/checkers/tx.pulsar.go index 8af4e47..a111ef1 100644 --- a/api/checkers/checkers/tx.pulsar.go +++ b/api/checkers/checkers/tx.pulsar.go @@ -2,19 +2,18 @@ package checkers import ( - fmt "fmt" - io "io" - reflect "reflect" - sync "sync" - _ "cosmossdk.io/api/amino" _ "cosmossdk.io/api/cosmos/msg/v1" + fmt "fmt" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" ) var ( diff --git a/api/checkers/checkers/tx_grpc.pb.go b/api/checkers/checkers/tx_grpc.pb.go index 09430f2..18fa5fe 100644 --- a/api/checkers/checkers/tx_grpc.pb.go +++ b/api/checkers/checkers/tx_grpc.pb.go @@ -8,7 +8,6 @@ package checkers import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/x/checkers/module/genesis.go b/x/checkers/module/genesis.go index d3ecf16..9313ba9 100644 --- a/x/checkers/module/genesis.go +++ b/x/checkers/module/genesis.go @@ -10,9 +10,8 @@ import ( // InitGenesis initializes the module's state from a provided genesis state. func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) { // Set if defined - if genState.SystemInfo != nil { - k.SetSystemInfo(ctx, *genState.SystemInfo) - } + k.SetSystemInfo(ctx, genState.SystemInfo) + // Set all the storedGame for _, elem := range genState.StoredGameList { k.SetStoredGame(ctx, elem) @@ -31,7 +30,7 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { // Get all systemInfo systemInfo, found := k.GetSystemInfo(ctx) if found { - genesis.SystemInfo = &systemInfo + genesis.SystemInfo = systemInfo } genesis.StoredGameList = k.GetAllStoredGame(ctx) // this line is used by starport scaffolding # genesis/module/export diff --git a/x/checkers/module/genesis_test.go b/x/checkers/module/genesis_test.go index 5dda4aa..ae7ea94 100644 --- a/x/checkers/module/genesis_test.go +++ b/x/checkers/module/genesis_test.go @@ -14,7 +14,7 @@ func TestGenesis(t *testing.T) { genesisState := types.GenesisState{ Params: types.DefaultParams(), - SystemInfo: &types.SystemInfo{ + SystemInfo: types.SystemInfo{ NextId: 67, }, StoredGameList: []types.StoredGame{ diff --git a/x/checkers/types/genesis.go b/x/checkers/types/genesis.go index be2aae5..a517cee 100644 --- a/x/checkers/types/genesis.go +++ b/x/checkers/types/genesis.go @@ -10,7 +10,9 @@ const DefaultIndex uint64 = 1 // DefaultGenesis returns the default genesis state func DefaultGenesis() *GenesisState { return &GenesisState{ - SystemInfo: nil, + SystemInfo: SystemInfo{ + NextId: uint64(DefaultIndex), + }, StoredGameList: []StoredGame{}, // this line is used by starport scaffolding # genesis/types/default Params: DefaultParams(), diff --git a/x/checkers/types/genesis.pb.go b/x/checkers/types/genesis.pb.go index 2818ae3..e59019e 100644 --- a/x/checkers/types/genesis.pb.go +++ b/x/checkers/types/genesis.pb.go @@ -5,13 +5,12 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. @@ -29,7 +28,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type GenesisState struct { // params defines all the parameters of the module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` - SystemInfo *SystemInfo `protobuf:"bytes,2,opt,name=systemInfo,proto3" json:"systemInfo,omitempty"` + SystemInfo SystemInfo `protobuf:"bytes,2,opt,name=systemInfo,proto3" json:"systemInfo"` StoredGameList []StoredGame `protobuf:"bytes,3,rep,name=storedGameList,proto3" json:"storedGameList"` } @@ -73,11 +72,11 @@ func (m *GenesisState) GetParams() Params { return Params{} } -func (m *GenesisState) GetSystemInfo() *SystemInfo { +func (m *GenesisState) GetSystemInfo() SystemInfo { if m != nil { return m.SystemInfo } - return nil + return SystemInfo{} } func (m *GenesisState) GetStoredGameList() []StoredGame { @@ -94,25 +93,26 @@ func init() { func init() { proto.RegisterFile("checkers/checkers/genesis.proto", fileDescriptor_e29994b75a5b5b77) } var fileDescriptor_e29994b75a5b5b77 = []byte{ - // 288 bytes of a gzipped FileDescriptorProto + // 289 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xce, 0x48, 0x4d, 0xce, 0x4e, 0x2d, 0x2a, 0xd6, 0x87, 0x33, 0xd2, 0x53, 0xf3, 0x52, 0x8b, 0x33, 0x8b, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x04, 0x61, 0xe2, 0x7a, 0x30, 0x86, 0x94, 0x60, 0x62, 0x6e, 0x66, 0x5e, 0xbe, 0x3e, 0x98, 0x84, 0xa8, 0x92, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x33, 0xf5, 0x41, 0x2c, 0xa8, 0xa8, 0x1c, 0xa6, 0xe1, 0x05, 0x89, 0x45, 0x89, 0xb9, 0x50, 0xb3, 0xa5, 0x94, 0x31, 0xe5, 0x8b, 0x2b, 0x8b, 0x4b, 0x52, 0x73, 0xe3, 0x33, 0xf3, 0xd2, 0xf2, 0xf1, 0x28, 0x2a, 0xc9, - 0x2f, 0x4a, 0x4d, 0x89, 0x4f, 0x4f, 0xcc, 0x4d, 0x85, 0x28, 0x52, 0xba, 0xc1, 0xc8, 0xc5, 0xe3, + 0x2f, 0x4a, 0x4d, 0x89, 0x4f, 0x4f, 0xcc, 0x4d, 0x85, 0x28, 0x52, 0xba, 0xc7, 0xc8, 0xc5, 0xe3, 0x0e, 0x71, 0x77, 0x70, 0x49, 0x62, 0x49, 0xaa, 0x90, 0x0d, 0x17, 0x1b, 0xc4, 0x2a, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x49, 0x3d, 0x0c, 0x7f, 0xe8, 0x05, 0x80, 0x15, 0x38, 0x71, 0x9e, - 0xb8, 0x27, 0xcf, 0xb0, 0xe2, 0xf9, 0x06, 0x2d, 0xc6, 0x20, 0xa8, 0x1e, 0x21, 0x5b, 0x2e, 0x2e, + 0xb8, 0x27, 0xcf, 0xb0, 0xe2, 0xf9, 0x06, 0x2d, 0xc6, 0x20, 0xa8, 0x1e, 0x21, 0x67, 0x2e, 0x2e, 0x88, 0x43, 0x3c, 0xf3, 0xd2, 0xf2, 0x25, 0x98, 0xc0, 0x26, 0xc8, 0x62, 0x31, 0x21, 0x18, 0xae, - 0x28, 0x08, 0x49, 0x83, 0x90, 0x37, 0x17, 0x1f, 0xc4, 0x89, 0xee, 0x89, 0xb9, 0xa9, 0x3e, 0x99, - 0xc5, 0x25, 0x12, 0xcc, 0x0a, 0xcc, 0xb8, 0x8c, 0x80, 0x2b, 0x74, 0x62, 0x01, 0x39, 0x24, 0x08, - 0x4d, 0xab, 0x93, 0xc7, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, - 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0xe9, 0xa5, - 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xe7, 0xe7, 0x64, 0xe6, 0xa6, 0x54, - 0x65, 0xe4, 0xe7, 0x21, 0x42, 0xa9, 0x02, 0xc1, 0x2c, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, - 0x87, 0x95, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x04, 0x63, 0xa2, 0x25, 0xf4, 0x01, 0x00, 0x00, + 0xc8, 0x89, 0x05, 0x64, 0x4a, 0x10, 0x92, 0x36, 0x21, 0x6f, 0x2e, 0x3e, 0x88, 0x43, 0xdd, 0x13, + 0x73, 0x53, 0x7d, 0x32, 0x8b, 0x4b, 0x24, 0x98, 0x15, 0x98, 0x71, 0x19, 0x04, 0x57, 0x08, 0x35, + 0x08, 0x4d, 0xab, 0x93, 0xc7, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, + 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0xe9, + 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xe7, 0xe7, 0x64, 0xe6, 0xa6, + 0x54, 0x65, 0xe4, 0xe7, 0x21, 0xc2, 0xaa, 0x02, 0xc1, 0x2c, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, + 0x03, 0x87, 0x98, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xcf, 0xa7, 0xba, 0xe2, 0xfa, 0x01, 0x00, + 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -149,18 +149,16 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x1a } } - if m.SystemInfo != nil { - { - size, err := m.SystemInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) + { + size, err := m.SystemInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x12 + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 { size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -193,10 +191,8 @@ func (m *GenesisState) Size() (n int) { _ = l l = m.Params.Size() n += 1 + l + sovGenesis(uint64(l)) - if m.SystemInfo != nil { - l = m.SystemInfo.Size() - n += 1 + l + sovGenesis(uint64(l)) - } + l = m.SystemInfo.Size() + n += 1 + l + sovGenesis(uint64(l)) if len(m.StoredGameList) > 0 { for _, e := range m.StoredGameList { l = e.Size() @@ -303,9 +299,6 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.SystemInfo == nil { - m.SystemInfo = &SystemInfo{} - } if err := m.SystemInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/checkers/types/genesis_test.go b/x/checkers/types/genesis_test.go index 423e3f4..1efd8ec 100644 --- a/x/checkers/types/genesis_test.go +++ b/x/checkers/types/genesis_test.go @@ -22,7 +22,7 @@ func TestGenesisState_Validate(t *testing.T) { desc: "valid genesis state", genState: &types.GenesisState{ - SystemInfo: &types.SystemInfo{ + SystemInfo: types.SystemInfo{ NextId: 100, }, StoredGameList: []types.StoredGame{ diff --git a/x/checkers/types/params.pb.go b/x/checkers/types/params.pb.go index 9aedf16..9a535fe 100644 --- a/x/checkers/types/params.pb.go +++ b/x/checkers/types/params.pb.go @@ -5,13 +5,12 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/checkers/types/query.pb.go b/x/checkers/types/query.pb.go index 765e253..c17dd33 100644 --- a/x/checkers/types/query.pb.go +++ b/x/checkers/types/query.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" @@ -19,6 +15,9 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/checkers/types/stored_game.pb.go b/x/checkers/types/stored_game.pb.go index dc558b2..069d123 100644 --- a/x/checkers/types/stored_game.pb.go +++ b/x/checkers/types/stored_game.pb.go @@ -5,11 +5,10 @@ package types import ( fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/checkers/types/system_info.pb.go b/x/checkers/types/system_info.pb.go index 27de06c..f917794 100644 --- a/x/checkers/types/system_info.pb.go +++ b/x/checkers/types/system_info.pb.go @@ -5,11 +5,10 @@ package types import ( fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/checkers/types/tx.pb.go b/x/checkers/types/tx.pb.go index 900d657..04f8543 100644 --- a/x/checkers/types/tx.pb.go +++ b/x/checkers/types/tx.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" @@ -19,6 +15,9 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used.