github.com/cosmos/cosmos-sdk@v0.50.10/x/group/genesis.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: cosmos/group/v1/genesis.proto 3 4 package group 5 6 import ( 7 fmt "fmt" 8 proto "github.com/cosmos/gogoproto/proto" 9 io "io" 10 math "math" 11 math_bits "math/bits" 12 ) 13 14 // Reference imports to suppress errors if they are not otherwise used. 15 var _ = proto.Marshal 16 var _ = fmt.Errorf 17 var _ = math.Inf 18 19 // This is a compile-time assertion to ensure that this generated file 20 // is compatible with the proto package it is being compiled against. 21 // A compilation error at this line likely means your copy of the 22 // proto package needs to be updated. 23 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 24 25 // GenesisState defines the group module's genesis state. 26 type GenesisState struct { 27 // group_seq is the group table orm.Sequence, 28 // it is used to get the next group ID. 29 GroupSeq uint64 `protobuf:"varint,1,opt,name=group_seq,json=groupSeq,proto3" json:"group_seq,omitempty"` 30 // groups is the list of groups info. 31 Groups []*GroupInfo `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups,omitempty"` 32 // group_members is the list of groups members. 33 GroupMembers []*GroupMember `protobuf:"bytes,3,rep,name=group_members,json=groupMembers,proto3" json:"group_members,omitempty"` 34 // group_policy_seq is the group policy table orm.Sequence, 35 // it is used to generate the next group policy account address. 36 GroupPolicySeq uint64 `protobuf:"varint,4,opt,name=group_policy_seq,json=groupPolicySeq,proto3" json:"group_policy_seq,omitempty"` 37 // group_policies is the list of group policies info. 38 GroupPolicies []*GroupPolicyInfo `protobuf:"bytes,5,rep,name=group_policies,json=groupPolicies,proto3" json:"group_policies,omitempty"` 39 // proposal_seq is the proposal table orm.Sequence, 40 // it is used to get the next proposal ID. 41 ProposalSeq uint64 `protobuf:"varint,6,opt,name=proposal_seq,json=proposalSeq,proto3" json:"proposal_seq,omitempty"` 42 // proposals is the list of proposals. 43 Proposals []*Proposal `protobuf:"bytes,7,rep,name=proposals,proto3" json:"proposals,omitempty"` 44 // votes is the list of votes. 45 Votes []*Vote `protobuf:"bytes,8,rep,name=votes,proto3" json:"votes,omitempty"` 46 } 47 48 func (m *GenesisState) Reset() { *m = GenesisState{} } 49 func (m *GenesisState) String() string { return proto.CompactTextString(m) } 50 func (*GenesisState) ProtoMessage() {} 51 func (*GenesisState) Descriptor() ([]byte, []int) { 52 return fileDescriptor_cc6105fe3ef99f06, []int{0} 53 } 54 func (m *GenesisState) XXX_Unmarshal(b []byte) error { 55 return m.Unmarshal(b) 56 } 57 func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 58 if deterministic { 59 return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) 60 } else { 61 b = b[:cap(b)] 62 n, err := m.MarshalToSizedBuffer(b) 63 if err != nil { 64 return nil, err 65 } 66 return b[:n], nil 67 } 68 } 69 func (m *GenesisState) XXX_Merge(src proto.Message) { 70 xxx_messageInfo_GenesisState.Merge(m, src) 71 } 72 func (m *GenesisState) XXX_Size() int { 73 return m.Size() 74 } 75 func (m *GenesisState) XXX_DiscardUnknown() { 76 xxx_messageInfo_GenesisState.DiscardUnknown(m) 77 } 78 79 var xxx_messageInfo_GenesisState proto.InternalMessageInfo 80 81 func (m *GenesisState) GetGroupSeq() uint64 { 82 if m != nil { 83 return m.GroupSeq 84 } 85 return 0 86 } 87 88 func (m *GenesisState) GetGroups() []*GroupInfo { 89 if m != nil { 90 return m.Groups 91 } 92 return nil 93 } 94 95 func (m *GenesisState) GetGroupMembers() []*GroupMember { 96 if m != nil { 97 return m.GroupMembers 98 } 99 return nil 100 } 101 102 func (m *GenesisState) GetGroupPolicySeq() uint64 { 103 if m != nil { 104 return m.GroupPolicySeq 105 } 106 return 0 107 } 108 109 func (m *GenesisState) GetGroupPolicies() []*GroupPolicyInfo { 110 if m != nil { 111 return m.GroupPolicies 112 } 113 return nil 114 } 115 116 func (m *GenesisState) GetProposalSeq() uint64 { 117 if m != nil { 118 return m.ProposalSeq 119 } 120 return 0 121 } 122 123 func (m *GenesisState) GetProposals() []*Proposal { 124 if m != nil { 125 return m.Proposals 126 } 127 return nil 128 } 129 130 func (m *GenesisState) GetVotes() []*Vote { 131 if m != nil { 132 return m.Votes 133 } 134 return nil 135 } 136 137 func init() { 138 proto.RegisterType((*GenesisState)(nil), "cosmos.group.v1.GenesisState") 139 } 140 141 func init() { proto.RegisterFile("cosmos/group/v1/genesis.proto", fileDescriptor_cc6105fe3ef99f06) } 142 143 var fileDescriptor_cc6105fe3ef99f06 = []byte{ 144 // 341 bytes of a gzipped FileDescriptorProto 145 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0xcf, 0x4e, 0xfa, 0x40, 146 0x10, 0xc7, 0xe9, 0x8f, 0x3f, 0x3f, 0x58, 0xfe, 0x68, 0x36, 0x31, 0xa9, 0xa0, 0x0d, 0x1a, 0x0f, 147 0x24, 0xc6, 0x36, 0xe0, 0xc1, 0x9b, 0x89, 0x5e, 0x88, 0x07, 0x13, 0x52, 0x12, 0x0f, 0x5e, 0x0c, 148 0xe0, 0x58, 0x1b, 0x29, 0x53, 0x3a, 0x0b, 0x91, 0xb7, 0xf0, 0x09, 0x7c, 0x1e, 0x8f, 0x1c, 0x3d, 149 0x1a, 0x78, 0x11, 0xc3, 0x6c, 0x49, 0x0d, 0x70, 0xda, 0xdd, 0xd9, 0xcf, 0x77, 0x3e, 0x93, 0x8c, 150 0x38, 0x1e, 0x20, 0x05, 0x48, 0x8e, 0x17, 0xe1, 0x24, 0x74, 0xa6, 0x4d, 0xc7, 0x83, 0x11, 0x90, 151 0x4f, 0x76, 0x18, 0xa1, 0x42, 0xb9, 0xa7, 0xbf, 0x6d, 0xfe, 0xb6, 0xa7, 0xcd, 0x6a, 0x6d, 0x93, 152 0x57, 0xb3, 0x10, 0x62, 0xfa, 0xf4, 0x33, 0x2d, 0x4a, 0x6d, 0x9d, 0xef, 0xaa, 0x9e, 0x02, 0x59, 153 0x13, 0x05, 0x06, 0x9f, 0x08, 0xc6, 0xa6, 0x51, 0x37, 0x1a, 0x19, 0x37, 0xcf, 0x85, 0x2e, 0x8c, 154 0x65, 0x4b, 0xe4, 0xf8, 0x4e, 0xe6, 0xbf, 0x7a, 0xba, 0x51, 0x6c, 0x55, 0xed, 0x0d, 0x99, 0xdd, 155 0x5e, 0x5d, 0xee, 0x46, 0x2f, 0xe8, 0xc6, 0xa4, 0xbc, 0x11, 0x65, 0xdd, 0x30, 0x80, 0xa0, 0x0f, 156 0x11, 0x99, 0x69, 0x8e, 0x1e, 0xed, 0x8e, 0xde, 0x33, 0xe4, 0x96, 0xbc, 0xe4, 0x41, 0xb2, 0x21, 157 0xf6, 0x75, 0x8b, 0x10, 0x87, 0xfe, 0x60, 0xc6, 0xa3, 0x65, 0x78, 0xb4, 0x0a, 0xd7, 0x3b, 0x5c, 158 0x5e, 0x0d, 0xd8, 0x16, 0x95, 0x3f, 0xa4, 0x0f, 0x64, 0x66, 0xd9, 0x56, 0xdf, 0x6d, 0xd3, 0x41, 159 0x1e, 0xb7, 0x9c, 0x74, 0xf2, 0x81, 0xe4, 0x89, 0x28, 0x85, 0x11, 0x86, 0x48, 0xbd, 0x21, 0xeb, 160 0x72, 0xac, 0x2b, 0xae, 0x6b, 0x2b, 0xd7, 0x95, 0x28, 0xac, 0x9f, 0x64, 0xfe, 0x67, 0xcd, 0xe1, 161 0x96, 0xa6, 0x13, 0x13, 0x6e, 0xc2, 0xca, 0x73, 0x91, 0x9d, 0xa2, 0x02, 0x32, 0xf3, 0x1c, 0x3a, 162 0xd8, 0x0a, 0x3d, 0xa0, 0x02, 0x57, 0x33, 0xb7, 0xd7, 0x5f, 0x0b, 0xcb, 0x98, 0x2f, 0x2c, 0xe3, 163 0x67, 0x61, 0x19, 0x1f, 0x4b, 0x2b, 0x35, 0x5f, 0x5a, 0xa9, 0xef, 0xa5, 0x95, 0x7a, 0x3c, 0xf3, 164 0x7c, 0xf5, 0x3a, 0xe9, 0xdb, 0x03, 0x0c, 0x9c, 0x78, 0xc5, 0xfa, 0xb8, 0xa0, 0xe7, 0x37, 0xe7, 165 0x5d, 0xef, 0xbb, 0x9f, 0xe3, 0x3d, 0x5f, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff, 0x99, 0x5b, 0x30, 166 0xc4, 0x36, 0x02, 0x00, 0x00, 167 } 168 169 func (m *GenesisState) Marshal() (dAtA []byte, err error) { 170 size := m.Size() 171 dAtA = make([]byte, size) 172 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 173 if err != nil { 174 return nil, err 175 } 176 return dAtA[:n], nil 177 } 178 179 func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { 180 size := m.Size() 181 return m.MarshalToSizedBuffer(dAtA[:size]) 182 } 183 184 func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { 185 i := len(dAtA) 186 _ = i 187 var l int 188 _ = l 189 if len(m.Votes) > 0 { 190 for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- { 191 { 192 size, err := m.Votes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 193 if err != nil { 194 return 0, err 195 } 196 i -= size 197 i = encodeVarintGenesis(dAtA, i, uint64(size)) 198 } 199 i-- 200 dAtA[i] = 0x42 201 } 202 } 203 if len(m.Proposals) > 0 { 204 for iNdEx := len(m.Proposals) - 1; iNdEx >= 0; iNdEx-- { 205 { 206 size, err := m.Proposals[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 207 if err != nil { 208 return 0, err 209 } 210 i -= size 211 i = encodeVarintGenesis(dAtA, i, uint64(size)) 212 } 213 i-- 214 dAtA[i] = 0x3a 215 } 216 } 217 if m.ProposalSeq != 0 { 218 i = encodeVarintGenesis(dAtA, i, uint64(m.ProposalSeq)) 219 i-- 220 dAtA[i] = 0x30 221 } 222 if len(m.GroupPolicies) > 0 { 223 for iNdEx := len(m.GroupPolicies) - 1; iNdEx >= 0; iNdEx-- { 224 { 225 size, err := m.GroupPolicies[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 226 if err != nil { 227 return 0, err 228 } 229 i -= size 230 i = encodeVarintGenesis(dAtA, i, uint64(size)) 231 } 232 i-- 233 dAtA[i] = 0x2a 234 } 235 } 236 if m.GroupPolicySeq != 0 { 237 i = encodeVarintGenesis(dAtA, i, uint64(m.GroupPolicySeq)) 238 i-- 239 dAtA[i] = 0x20 240 } 241 if len(m.GroupMembers) > 0 { 242 for iNdEx := len(m.GroupMembers) - 1; iNdEx >= 0; iNdEx-- { 243 { 244 size, err := m.GroupMembers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 245 if err != nil { 246 return 0, err 247 } 248 i -= size 249 i = encodeVarintGenesis(dAtA, i, uint64(size)) 250 } 251 i-- 252 dAtA[i] = 0x1a 253 } 254 } 255 if len(m.Groups) > 0 { 256 for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- { 257 { 258 size, err := m.Groups[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 259 if err != nil { 260 return 0, err 261 } 262 i -= size 263 i = encodeVarintGenesis(dAtA, i, uint64(size)) 264 } 265 i-- 266 dAtA[i] = 0x12 267 } 268 } 269 if m.GroupSeq != 0 { 270 i = encodeVarintGenesis(dAtA, i, uint64(m.GroupSeq)) 271 i-- 272 dAtA[i] = 0x8 273 } 274 return len(dAtA) - i, nil 275 } 276 277 func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { 278 offset -= sovGenesis(v) 279 base := offset 280 for v >= 1<<7 { 281 dAtA[offset] = uint8(v&0x7f | 0x80) 282 v >>= 7 283 offset++ 284 } 285 dAtA[offset] = uint8(v) 286 return base 287 } 288 func (m *GenesisState) Size() (n int) { 289 if m == nil { 290 return 0 291 } 292 var l int 293 _ = l 294 if m.GroupSeq != 0 { 295 n += 1 + sovGenesis(uint64(m.GroupSeq)) 296 } 297 if len(m.Groups) > 0 { 298 for _, e := range m.Groups { 299 l = e.Size() 300 n += 1 + l + sovGenesis(uint64(l)) 301 } 302 } 303 if len(m.GroupMembers) > 0 { 304 for _, e := range m.GroupMembers { 305 l = e.Size() 306 n += 1 + l + sovGenesis(uint64(l)) 307 } 308 } 309 if m.GroupPolicySeq != 0 { 310 n += 1 + sovGenesis(uint64(m.GroupPolicySeq)) 311 } 312 if len(m.GroupPolicies) > 0 { 313 for _, e := range m.GroupPolicies { 314 l = e.Size() 315 n += 1 + l + sovGenesis(uint64(l)) 316 } 317 } 318 if m.ProposalSeq != 0 { 319 n += 1 + sovGenesis(uint64(m.ProposalSeq)) 320 } 321 if len(m.Proposals) > 0 { 322 for _, e := range m.Proposals { 323 l = e.Size() 324 n += 1 + l + sovGenesis(uint64(l)) 325 } 326 } 327 if len(m.Votes) > 0 { 328 for _, e := range m.Votes { 329 l = e.Size() 330 n += 1 + l + sovGenesis(uint64(l)) 331 } 332 } 333 return n 334 } 335 336 func sovGenesis(x uint64) (n int) { 337 return (math_bits.Len64(x|1) + 6) / 7 338 } 339 func sozGenesis(x uint64) (n int) { 340 return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 341 } 342 func (m *GenesisState) Unmarshal(dAtA []byte) error { 343 l := len(dAtA) 344 iNdEx := 0 345 for iNdEx < l { 346 preIndex := iNdEx 347 var wire uint64 348 for shift := uint(0); ; shift += 7 { 349 if shift >= 64 { 350 return ErrIntOverflowGenesis 351 } 352 if iNdEx >= l { 353 return io.ErrUnexpectedEOF 354 } 355 b := dAtA[iNdEx] 356 iNdEx++ 357 wire |= uint64(b&0x7F) << shift 358 if b < 0x80 { 359 break 360 } 361 } 362 fieldNum := int32(wire >> 3) 363 wireType := int(wire & 0x7) 364 if wireType == 4 { 365 return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") 366 } 367 if fieldNum <= 0 { 368 return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) 369 } 370 switch fieldNum { 371 case 1: 372 if wireType != 0 { 373 return fmt.Errorf("proto: wrong wireType = %d for field GroupSeq", wireType) 374 } 375 m.GroupSeq = 0 376 for shift := uint(0); ; shift += 7 { 377 if shift >= 64 { 378 return ErrIntOverflowGenesis 379 } 380 if iNdEx >= l { 381 return io.ErrUnexpectedEOF 382 } 383 b := dAtA[iNdEx] 384 iNdEx++ 385 m.GroupSeq |= uint64(b&0x7F) << shift 386 if b < 0x80 { 387 break 388 } 389 } 390 case 2: 391 if wireType != 2 { 392 return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) 393 } 394 var msglen int 395 for shift := uint(0); ; shift += 7 { 396 if shift >= 64 { 397 return ErrIntOverflowGenesis 398 } 399 if iNdEx >= l { 400 return io.ErrUnexpectedEOF 401 } 402 b := dAtA[iNdEx] 403 iNdEx++ 404 msglen |= int(b&0x7F) << shift 405 if b < 0x80 { 406 break 407 } 408 } 409 if msglen < 0 { 410 return ErrInvalidLengthGenesis 411 } 412 postIndex := iNdEx + msglen 413 if postIndex < 0 { 414 return ErrInvalidLengthGenesis 415 } 416 if postIndex > l { 417 return io.ErrUnexpectedEOF 418 } 419 m.Groups = append(m.Groups, &GroupInfo{}) 420 if err := m.Groups[len(m.Groups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 421 return err 422 } 423 iNdEx = postIndex 424 case 3: 425 if wireType != 2 { 426 return fmt.Errorf("proto: wrong wireType = %d for field GroupMembers", wireType) 427 } 428 var msglen int 429 for shift := uint(0); ; shift += 7 { 430 if shift >= 64 { 431 return ErrIntOverflowGenesis 432 } 433 if iNdEx >= l { 434 return io.ErrUnexpectedEOF 435 } 436 b := dAtA[iNdEx] 437 iNdEx++ 438 msglen |= int(b&0x7F) << shift 439 if b < 0x80 { 440 break 441 } 442 } 443 if msglen < 0 { 444 return ErrInvalidLengthGenesis 445 } 446 postIndex := iNdEx + msglen 447 if postIndex < 0 { 448 return ErrInvalidLengthGenesis 449 } 450 if postIndex > l { 451 return io.ErrUnexpectedEOF 452 } 453 m.GroupMembers = append(m.GroupMembers, &GroupMember{}) 454 if err := m.GroupMembers[len(m.GroupMembers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 455 return err 456 } 457 iNdEx = postIndex 458 case 4: 459 if wireType != 0 { 460 return fmt.Errorf("proto: wrong wireType = %d for field GroupPolicySeq", wireType) 461 } 462 m.GroupPolicySeq = 0 463 for shift := uint(0); ; shift += 7 { 464 if shift >= 64 { 465 return ErrIntOverflowGenesis 466 } 467 if iNdEx >= l { 468 return io.ErrUnexpectedEOF 469 } 470 b := dAtA[iNdEx] 471 iNdEx++ 472 m.GroupPolicySeq |= uint64(b&0x7F) << shift 473 if b < 0x80 { 474 break 475 } 476 } 477 case 5: 478 if wireType != 2 { 479 return fmt.Errorf("proto: wrong wireType = %d for field GroupPolicies", wireType) 480 } 481 var msglen int 482 for shift := uint(0); ; shift += 7 { 483 if shift >= 64 { 484 return ErrIntOverflowGenesis 485 } 486 if iNdEx >= l { 487 return io.ErrUnexpectedEOF 488 } 489 b := dAtA[iNdEx] 490 iNdEx++ 491 msglen |= int(b&0x7F) << shift 492 if b < 0x80 { 493 break 494 } 495 } 496 if msglen < 0 { 497 return ErrInvalidLengthGenesis 498 } 499 postIndex := iNdEx + msglen 500 if postIndex < 0 { 501 return ErrInvalidLengthGenesis 502 } 503 if postIndex > l { 504 return io.ErrUnexpectedEOF 505 } 506 m.GroupPolicies = append(m.GroupPolicies, &GroupPolicyInfo{}) 507 if err := m.GroupPolicies[len(m.GroupPolicies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 508 return err 509 } 510 iNdEx = postIndex 511 case 6: 512 if wireType != 0 { 513 return fmt.Errorf("proto: wrong wireType = %d for field ProposalSeq", wireType) 514 } 515 m.ProposalSeq = 0 516 for shift := uint(0); ; shift += 7 { 517 if shift >= 64 { 518 return ErrIntOverflowGenesis 519 } 520 if iNdEx >= l { 521 return io.ErrUnexpectedEOF 522 } 523 b := dAtA[iNdEx] 524 iNdEx++ 525 m.ProposalSeq |= uint64(b&0x7F) << shift 526 if b < 0x80 { 527 break 528 } 529 } 530 case 7: 531 if wireType != 2 { 532 return fmt.Errorf("proto: wrong wireType = %d for field Proposals", wireType) 533 } 534 var msglen int 535 for shift := uint(0); ; shift += 7 { 536 if shift >= 64 { 537 return ErrIntOverflowGenesis 538 } 539 if iNdEx >= l { 540 return io.ErrUnexpectedEOF 541 } 542 b := dAtA[iNdEx] 543 iNdEx++ 544 msglen |= int(b&0x7F) << shift 545 if b < 0x80 { 546 break 547 } 548 } 549 if msglen < 0 { 550 return ErrInvalidLengthGenesis 551 } 552 postIndex := iNdEx + msglen 553 if postIndex < 0 { 554 return ErrInvalidLengthGenesis 555 } 556 if postIndex > l { 557 return io.ErrUnexpectedEOF 558 } 559 m.Proposals = append(m.Proposals, &Proposal{}) 560 if err := m.Proposals[len(m.Proposals)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 561 return err 562 } 563 iNdEx = postIndex 564 case 8: 565 if wireType != 2 { 566 return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType) 567 } 568 var msglen int 569 for shift := uint(0); ; shift += 7 { 570 if shift >= 64 { 571 return ErrIntOverflowGenesis 572 } 573 if iNdEx >= l { 574 return io.ErrUnexpectedEOF 575 } 576 b := dAtA[iNdEx] 577 iNdEx++ 578 msglen |= int(b&0x7F) << shift 579 if b < 0x80 { 580 break 581 } 582 } 583 if msglen < 0 { 584 return ErrInvalidLengthGenesis 585 } 586 postIndex := iNdEx + msglen 587 if postIndex < 0 { 588 return ErrInvalidLengthGenesis 589 } 590 if postIndex > l { 591 return io.ErrUnexpectedEOF 592 } 593 m.Votes = append(m.Votes, &Vote{}) 594 if err := m.Votes[len(m.Votes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 595 return err 596 } 597 iNdEx = postIndex 598 default: 599 iNdEx = preIndex 600 skippy, err := skipGenesis(dAtA[iNdEx:]) 601 if err != nil { 602 return err 603 } 604 if (skippy < 0) || (iNdEx+skippy) < 0 { 605 return ErrInvalidLengthGenesis 606 } 607 if (iNdEx + skippy) > l { 608 return io.ErrUnexpectedEOF 609 } 610 iNdEx += skippy 611 } 612 } 613 614 if iNdEx > l { 615 return io.ErrUnexpectedEOF 616 } 617 return nil 618 } 619 func skipGenesis(dAtA []byte) (n int, err error) { 620 l := len(dAtA) 621 iNdEx := 0 622 depth := 0 623 for iNdEx < l { 624 var wire uint64 625 for shift := uint(0); ; shift += 7 { 626 if shift >= 64 { 627 return 0, ErrIntOverflowGenesis 628 } 629 if iNdEx >= l { 630 return 0, io.ErrUnexpectedEOF 631 } 632 b := dAtA[iNdEx] 633 iNdEx++ 634 wire |= (uint64(b) & 0x7F) << shift 635 if b < 0x80 { 636 break 637 } 638 } 639 wireType := int(wire & 0x7) 640 switch wireType { 641 case 0: 642 for shift := uint(0); ; shift += 7 { 643 if shift >= 64 { 644 return 0, ErrIntOverflowGenesis 645 } 646 if iNdEx >= l { 647 return 0, io.ErrUnexpectedEOF 648 } 649 iNdEx++ 650 if dAtA[iNdEx-1] < 0x80 { 651 break 652 } 653 } 654 case 1: 655 iNdEx += 8 656 case 2: 657 var length int 658 for shift := uint(0); ; shift += 7 { 659 if shift >= 64 { 660 return 0, ErrIntOverflowGenesis 661 } 662 if iNdEx >= l { 663 return 0, io.ErrUnexpectedEOF 664 } 665 b := dAtA[iNdEx] 666 iNdEx++ 667 length |= (int(b) & 0x7F) << shift 668 if b < 0x80 { 669 break 670 } 671 } 672 if length < 0 { 673 return 0, ErrInvalidLengthGenesis 674 } 675 iNdEx += length 676 case 3: 677 depth++ 678 case 4: 679 if depth == 0 { 680 return 0, ErrUnexpectedEndOfGroupGenesis 681 } 682 depth-- 683 case 5: 684 iNdEx += 4 685 default: 686 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 687 } 688 if iNdEx < 0 { 689 return 0, ErrInvalidLengthGenesis 690 } 691 if depth == 0 { 692 return iNdEx, nil 693 } 694 } 695 return 0, io.ErrUnexpectedEOF 696 } 697 698 var ( 699 ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") 700 ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") 701 ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") 702 )