github.com/Oyster-zx/tendermint@v0.34.24-fork/proto/tendermint/consensus/types.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: tendermint/consensus/types.proto 3 4 package consensus 5 6 import ( 7 fmt "fmt" 8 _ "github.com/gogo/protobuf/gogoproto" 9 proto "github.com/gogo/protobuf/proto" 10 bits "github.com/tendermint/tendermint/proto/tendermint/libs/bits" 11 types "github.com/tendermint/tendermint/proto/tendermint/types" 12 io "io" 13 math "math" 14 math_bits "math/bits" 15 ) 16 17 // Reference imports to suppress errors if they are not otherwise used. 18 var _ = proto.Marshal 19 var _ = fmt.Errorf 20 var _ = math.Inf 21 22 // This is a compile-time assertion to ensure that this generated file 23 // is compatible with the proto package it is being compiled against. 24 // A compilation error at this line likely means your copy of the 25 // proto package needs to be updated. 26 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 27 28 // NewRoundStep is sent for every step taken in the ConsensusState. 29 // For every height/round/step transition 30 type NewRoundStep struct { 31 Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` 32 Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` 33 Step uint32 `protobuf:"varint,3,opt,name=step,proto3" json:"step,omitempty"` 34 SecondsSinceStartTime int64 `protobuf:"varint,4,opt,name=seconds_since_start_time,json=secondsSinceStartTime,proto3" json:"seconds_since_start_time,omitempty"` 35 LastCommitRound int32 `protobuf:"varint,5,opt,name=last_commit_round,json=lastCommitRound,proto3" json:"last_commit_round,omitempty"` 36 } 37 38 func (m *NewRoundStep) Reset() { *m = NewRoundStep{} } 39 func (m *NewRoundStep) String() string { return proto.CompactTextString(m) } 40 func (*NewRoundStep) ProtoMessage() {} 41 func (*NewRoundStep) Descriptor() ([]byte, []int) { 42 return fileDescriptor_81a22d2efc008981, []int{0} 43 } 44 func (m *NewRoundStep) XXX_Unmarshal(b []byte) error { 45 return m.Unmarshal(b) 46 } 47 func (m *NewRoundStep) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 48 if deterministic { 49 return xxx_messageInfo_NewRoundStep.Marshal(b, m, deterministic) 50 } else { 51 b = b[:cap(b)] 52 n, err := m.MarshalToSizedBuffer(b) 53 if err != nil { 54 return nil, err 55 } 56 return b[:n], nil 57 } 58 } 59 func (m *NewRoundStep) XXX_Merge(src proto.Message) { 60 xxx_messageInfo_NewRoundStep.Merge(m, src) 61 } 62 func (m *NewRoundStep) XXX_Size() int { 63 return m.Size() 64 } 65 func (m *NewRoundStep) XXX_DiscardUnknown() { 66 xxx_messageInfo_NewRoundStep.DiscardUnknown(m) 67 } 68 69 var xxx_messageInfo_NewRoundStep proto.InternalMessageInfo 70 71 func (m *NewRoundStep) GetHeight() int64 { 72 if m != nil { 73 return m.Height 74 } 75 return 0 76 } 77 78 func (m *NewRoundStep) GetRound() int32 { 79 if m != nil { 80 return m.Round 81 } 82 return 0 83 } 84 85 func (m *NewRoundStep) GetStep() uint32 { 86 if m != nil { 87 return m.Step 88 } 89 return 0 90 } 91 92 func (m *NewRoundStep) GetSecondsSinceStartTime() int64 { 93 if m != nil { 94 return m.SecondsSinceStartTime 95 } 96 return 0 97 } 98 99 func (m *NewRoundStep) GetLastCommitRound() int32 { 100 if m != nil { 101 return m.LastCommitRound 102 } 103 return 0 104 } 105 106 // NewValidBlock is sent when a validator observes a valid block B in some round r, 107 // i.e., there is a Proposal for block B and 2/3+ prevotes for the block B in the round r. 108 // In case the block is also committed, then IsCommit flag is set to true. 109 type NewValidBlock struct { 110 Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` 111 Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` 112 BlockPartSetHeader types.PartSetHeader `protobuf:"bytes,3,opt,name=block_part_set_header,json=blockPartSetHeader,proto3" json:"block_part_set_header"` 113 BlockParts *bits.BitArray `protobuf:"bytes,4,opt,name=block_parts,json=blockParts,proto3" json:"block_parts,omitempty"` 114 IsCommit bool `protobuf:"varint,5,opt,name=is_commit,json=isCommit,proto3" json:"is_commit,omitempty"` 115 } 116 117 func (m *NewValidBlock) Reset() { *m = NewValidBlock{} } 118 func (m *NewValidBlock) String() string { return proto.CompactTextString(m) } 119 func (*NewValidBlock) ProtoMessage() {} 120 func (*NewValidBlock) Descriptor() ([]byte, []int) { 121 return fileDescriptor_81a22d2efc008981, []int{1} 122 } 123 func (m *NewValidBlock) XXX_Unmarshal(b []byte) error { 124 return m.Unmarshal(b) 125 } 126 func (m *NewValidBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 127 if deterministic { 128 return xxx_messageInfo_NewValidBlock.Marshal(b, m, deterministic) 129 } else { 130 b = b[:cap(b)] 131 n, err := m.MarshalToSizedBuffer(b) 132 if err != nil { 133 return nil, err 134 } 135 return b[:n], nil 136 } 137 } 138 func (m *NewValidBlock) XXX_Merge(src proto.Message) { 139 xxx_messageInfo_NewValidBlock.Merge(m, src) 140 } 141 func (m *NewValidBlock) XXX_Size() int { 142 return m.Size() 143 } 144 func (m *NewValidBlock) XXX_DiscardUnknown() { 145 xxx_messageInfo_NewValidBlock.DiscardUnknown(m) 146 } 147 148 var xxx_messageInfo_NewValidBlock proto.InternalMessageInfo 149 150 func (m *NewValidBlock) GetHeight() int64 { 151 if m != nil { 152 return m.Height 153 } 154 return 0 155 } 156 157 func (m *NewValidBlock) GetRound() int32 { 158 if m != nil { 159 return m.Round 160 } 161 return 0 162 } 163 164 func (m *NewValidBlock) GetBlockPartSetHeader() types.PartSetHeader { 165 if m != nil { 166 return m.BlockPartSetHeader 167 } 168 return types.PartSetHeader{} 169 } 170 171 func (m *NewValidBlock) GetBlockParts() *bits.BitArray { 172 if m != nil { 173 return m.BlockParts 174 } 175 return nil 176 } 177 178 func (m *NewValidBlock) GetIsCommit() bool { 179 if m != nil { 180 return m.IsCommit 181 } 182 return false 183 } 184 185 // Proposal is sent when a new block is proposed. 186 type Proposal struct { 187 Proposal types.Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal"` 188 } 189 190 func (m *Proposal) Reset() { *m = Proposal{} } 191 func (m *Proposal) String() string { return proto.CompactTextString(m) } 192 func (*Proposal) ProtoMessage() {} 193 func (*Proposal) Descriptor() ([]byte, []int) { 194 return fileDescriptor_81a22d2efc008981, []int{2} 195 } 196 func (m *Proposal) XXX_Unmarshal(b []byte) error { 197 return m.Unmarshal(b) 198 } 199 func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 200 if deterministic { 201 return xxx_messageInfo_Proposal.Marshal(b, m, deterministic) 202 } else { 203 b = b[:cap(b)] 204 n, err := m.MarshalToSizedBuffer(b) 205 if err != nil { 206 return nil, err 207 } 208 return b[:n], nil 209 } 210 } 211 func (m *Proposal) XXX_Merge(src proto.Message) { 212 xxx_messageInfo_Proposal.Merge(m, src) 213 } 214 func (m *Proposal) XXX_Size() int { 215 return m.Size() 216 } 217 func (m *Proposal) XXX_DiscardUnknown() { 218 xxx_messageInfo_Proposal.DiscardUnknown(m) 219 } 220 221 var xxx_messageInfo_Proposal proto.InternalMessageInfo 222 223 func (m *Proposal) GetProposal() types.Proposal { 224 if m != nil { 225 return m.Proposal 226 } 227 return types.Proposal{} 228 } 229 230 // ProposalPOL is sent when a previous proposal is re-proposed. 231 type ProposalPOL struct { 232 Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` 233 ProposalPolRound int32 `protobuf:"varint,2,opt,name=proposal_pol_round,json=proposalPolRound,proto3" json:"proposal_pol_round,omitempty"` 234 ProposalPol bits.BitArray `protobuf:"bytes,3,opt,name=proposal_pol,json=proposalPol,proto3" json:"proposal_pol"` 235 } 236 237 func (m *ProposalPOL) Reset() { *m = ProposalPOL{} } 238 func (m *ProposalPOL) String() string { return proto.CompactTextString(m) } 239 func (*ProposalPOL) ProtoMessage() {} 240 func (*ProposalPOL) Descriptor() ([]byte, []int) { 241 return fileDescriptor_81a22d2efc008981, []int{3} 242 } 243 func (m *ProposalPOL) XXX_Unmarshal(b []byte) error { 244 return m.Unmarshal(b) 245 } 246 func (m *ProposalPOL) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 247 if deterministic { 248 return xxx_messageInfo_ProposalPOL.Marshal(b, m, deterministic) 249 } else { 250 b = b[:cap(b)] 251 n, err := m.MarshalToSizedBuffer(b) 252 if err != nil { 253 return nil, err 254 } 255 return b[:n], nil 256 } 257 } 258 func (m *ProposalPOL) XXX_Merge(src proto.Message) { 259 xxx_messageInfo_ProposalPOL.Merge(m, src) 260 } 261 func (m *ProposalPOL) XXX_Size() int { 262 return m.Size() 263 } 264 func (m *ProposalPOL) XXX_DiscardUnknown() { 265 xxx_messageInfo_ProposalPOL.DiscardUnknown(m) 266 } 267 268 var xxx_messageInfo_ProposalPOL proto.InternalMessageInfo 269 270 func (m *ProposalPOL) GetHeight() int64 { 271 if m != nil { 272 return m.Height 273 } 274 return 0 275 } 276 277 func (m *ProposalPOL) GetProposalPolRound() int32 { 278 if m != nil { 279 return m.ProposalPolRound 280 } 281 return 0 282 } 283 284 func (m *ProposalPOL) GetProposalPol() bits.BitArray { 285 if m != nil { 286 return m.ProposalPol 287 } 288 return bits.BitArray{} 289 } 290 291 // BlockPart is sent when gossipping a piece of the proposed block. 292 type BlockPart struct { 293 Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` 294 Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` 295 Part types.Part `protobuf:"bytes,3,opt,name=part,proto3" json:"part"` 296 } 297 298 func (m *BlockPart) Reset() { *m = BlockPart{} } 299 func (m *BlockPart) String() string { return proto.CompactTextString(m) } 300 func (*BlockPart) ProtoMessage() {} 301 func (*BlockPart) Descriptor() ([]byte, []int) { 302 return fileDescriptor_81a22d2efc008981, []int{4} 303 } 304 func (m *BlockPart) XXX_Unmarshal(b []byte) error { 305 return m.Unmarshal(b) 306 } 307 func (m *BlockPart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 308 if deterministic { 309 return xxx_messageInfo_BlockPart.Marshal(b, m, deterministic) 310 } else { 311 b = b[:cap(b)] 312 n, err := m.MarshalToSizedBuffer(b) 313 if err != nil { 314 return nil, err 315 } 316 return b[:n], nil 317 } 318 } 319 func (m *BlockPart) XXX_Merge(src proto.Message) { 320 xxx_messageInfo_BlockPart.Merge(m, src) 321 } 322 func (m *BlockPart) XXX_Size() int { 323 return m.Size() 324 } 325 func (m *BlockPart) XXX_DiscardUnknown() { 326 xxx_messageInfo_BlockPart.DiscardUnknown(m) 327 } 328 329 var xxx_messageInfo_BlockPart proto.InternalMessageInfo 330 331 func (m *BlockPart) GetHeight() int64 { 332 if m != nil { 333 return m.Height 334 } 335 return 0 336 } 337 338 func (m *BlockPart) GetRound() int32 { 339 if m != nil { 340 return m.Round 341 } 342 return 0 343 } 344 345 func (m *BlockPart) GetPart() types.Part { 346 if m != nil { 347 return m.Part 348 } 349 return types.Part{} 350 } 351 352 // Vote is sent when voting for a proposal (or lack thereof). 353 type Vote struct { 354 Vote *types.Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote,omitempty"` 355 } 356 357 func (m *Vote) Reset() { *m = Vote{} } 358 func (m *Vote) String() string { return proto.CompactTextString(m) } 359 func (*Vote) ProtoMessage() {} 360 func (*Vote) Descriptor() ([]byte, []int) { 361 return fileDescriptor_81a22d2efc008981, []int{5} 362 } 363 func (m *Vote) XXX_Unmarshal(b []byte) error { 364 return m.Unmarshal(b) 365 } 366 func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 367 if deterministic { 368 return xxx_messageInfo_Vote.Marshal(b, m, deterministic) 369 } else { 370 b = b[:cap(b)] 371 n, err := m.MarshalToSizedBuffer(b) 372 if err != nil { 373 return nil, err 374 } 375 return b[:n], nil 376 } 377 } 378 func (m *Vote) XXX_Merge(src proto.Message) { 379 xxx_messageInfo_Vote.Merge(m, src) 380 } 381 func (m *Vote) XXX_Size() int { 382 return m.Size() 383 } 384 func (m *Vote) XXX_DiscardUnknown() { 385 xxx_messageInfo_Vote.DiscardUnknown(m) 386 } 387 388 var xxx_messageInfo_Vote proto.InternalMessageInfo 389 390 func (m *Vote) GetVote() *types.Vote { 391 if m != nil { 392 return m.Vote 393 } 394 return nil 395 } 396 397 // HasVote is sent to indicate that a particular vote has been received. 398 type HasVote struct { 399 Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` 400 Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` 401 Type types.SignedMsgType `protobuf:"varint,3,opt,name=type,proto3,enum=tendermint.types.SignedMsgType" json:"type,omitempty"` 402 Index int32 `protobuf:"varint,4,opt,name=index,proto3" json:"index,omitempty"` 403 } 404 405 func (m *HasVote) Reset() { *m = HasVote{} } 406 func (m *HasVote) String() string { return proto.CompactTextString(m) } 407 func (*HasVote) ProtoMessage() {} 408 func (*HasVote) Descriptor() ([]byte, []int) { 409 return fileDescriptor_81a22d2efc008981, []int{6} 410 } 411 func (m *HasVote) XXX_Unmarshal(b []byte) error { 412 return m.Unmarshal(b) 413 } 414 func (m *HasVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 415 if deterministic { 416 return xxx_messageInfo_HasVote.Marshal(b, m, deterministic) 417 } else { 418 b = b[:cap(b)] 419 n, err := m.MarshalToSizedBuffer(b) 420 if err != nil { 421 return nil, err 422 } 423 return b[:n], nil 424 } 425 } 426 func (m *HasVote) XXX_Merge(src proto.Message) { 427 xxx_messageInfo_HasVote.Merge(m, src) 428 } 429 func (m *HasVote) XXX_Size() int { 430 return m.Size() 431 } 432 func (m *HasVote) XXX_DiscardUnknown() { 433 xxx_messageInfo_HasVote.DiscardUnknown(m) 434 } 435 436 var xxx_messageInfo_HasVote proto.InternalMessageInfo 437 438 func (m *HasVote) GetHeight() int64 { 439 if m != nil { 440 return m.Height 441 } 442 return 0 443 } 444 445 func (m *HasVote) GetRound() int32 { 446 if m != nil { 447 return m.Round 448 } 449 return 0 450 } 451 452 func (m *HasVote) GetType() types.SignedMsgType { 453 if m != nil { 454 return m.Type 455 } 456 return types.UnknownType 457 } 458 459 func (m *HasVote) GetIndex() int32 { 460 if m != nil { 461 return m.Index 462 } 463 return 0 464 } 465 466 // VoteSetMaj23 is sent to indicate that a given BlockID has seen +2/3 votes. 467 type VoteSetMaj23 struct { 468 Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` 469 Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` 470 Type types.SignedMsgType `protobuf:"varint,3,opt,name=type,proto3,enum=tendermint.types.SignedMsgType" json:"type,omitempty"` 471 BlockID types.BlockID `protobuf:"bytes,4,opt,name=block_id,json=blockId,proto3" json:"block_id"` 472 } 473 474 func (m *VoteSetMaj23) Reset() { *m = VoteSetMaj23{} } 475 func (m *VoteSetMaj23) String() string { return proto.CompactTextString(m) } 476 func (*VoteSetMaj23) ProtoMessage() {} 477 func (*VoteSetMaj23) Descriptor() ([]byte, []int) { 478 return fileDescriptor_81a22d2efc008981, []int{7} 479 } 480 func (m *VoteSetMaj23) XXX_Unmarshal(b []byte) error { 481 return m.Unmarshal(b) 482 } 483 func (m *VoteSetMaj23) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 484 if deterministic { 485 return xxx_messageInfo_VoteSetMaj23.Marshal(b, m, deterministic) 486 } else { 487 b = b[:cap(b)] 488 n, err := m.MarshalToSizedBuffer(b) 489 if err != nil { 490 return nil, err 491 } 492 return b[:n], nil 493 } 494 } 495 func (m *VoteSetMaj23) XXX_Merge(src proto.Message) { 496 xxx_messageInfo_VoteSetMaj23.Merge(m, src) 497 } 498 func (m *VoteSetMaj23) XXX_Size() int { 499 return m.Size() 500 } 501 func (m *VoteSetMaj23) XXX_DiscardUnknown() { 502 xxx_messageInfo_VoteSetMaj23.DiscardUnknown(m) 503 } 504 505 var xxx_messageInfo_VoteSetMaj23 proto.InternalMessageInfo 506 507 func (m *VoteSetMaj23) GetHeight() int64 { 508 if m != nil { 509 return m.Height 510 } 511 return 0 512 } 513 514 func (m *VoteSetMaj23) GetRound() int32 { 515 if m != nil { 516 return m.Round 517 } 518 return 0 519 } 520 521 func (m *VoteSetMaj23) GetType() types.SignedMsgType { 522 if m != nil { 523 return m.Type 524 } 525 return types.UnknownType 526 } 527 528 func (m *VoteSetMaj23) GetBlockID() types.BlockID { 529 if m != nil { 530 return m.BlockID 531 } 532 return types.BlockID{} 533 } 534 535 // VoteSetBits is sent to communicate the bit-array of votes seen for the BlockID. 536 type VoteSetBits struct { 537 Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` 538 Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` 539 Type types.SignedMsgType `protobuf:"varint,3,opt,name=type,proto3,enum=tendermint.types.SignedMsgType" json:"type,omitempty"` 540 BlockID types.BlockID `protobuf:"bytes,4,opt,name=block_id,json=blockId,proto3" json:"block_id"` 541 Votes bits.BitArray `protobuf:"bytes,5,opt,name=votes,proto3" json:"votes"` 542 } 543 544 func (m *VoteSetBits) Reset() { *m = VoteSetBits{} } 545 func (m *VoteSetBits) String() string { return proto.CompactTextString(m) } 546 func (*VoteSetBits) ProtoMessage() {} 547 func (*VoteSetBits) Descriptor() ([]byte, []int) { 548 return fileDescriptor_81a22d2efc008981, []int{8} 549 } 550 func (m *VoteSetBits) XXX_Unmarshal(b []byte) error { 551 return m.Unmarshal(b) 552 } 553 func (m *VoteSetBits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 554 if deterministic { 555 return xxx_messageInfo_VoteSetBits.Marshal(b, m, deterministic) 556 } else { 557 b = b[:cap(b)] 558 n, err := m.MarshalToSizedBuffer(b) 559 if err != nil { 560 return nil, err 561 } 562 return b[:n], nil 563 } 564 } 565 func (m *VoteSetBits) XXX_Merge(src proto.Message) { 566 xxx_messageInfo_VoteSetBits.Merge(m, src) 567 } 568 func (m *VoteSetBits) XXX_Size() int { 569 return m.Size() 570 } 571 func (m *VoteSetBits) XXX_DiscardUnknown() { 572 xxx_messageInfo_VoteSetBits.DiscardUnknown(m) 573 } 574 575 var xxx_messageInfo_VoteSetBits proto.InternalMessageInfo 576 577 func (m *VoteSetBits) GetHeight() int64 { 578 if m != nil { 579 return m.Height 580 } 581 return 0 582 } 583 584 func (m *VoteSetBits) GetRound() int32 { 585 if m != nil { 586 return m.Round 587 } 588 return 0 589 } 590 591 func (m *VoteSetBits) GetType() types.SignedMsgType { 592 if m != nil { 593 return m.Type 594 } 595 return types.UnknownType 596 } 597 598 func (m *VoteSetBits) GetBlockID() types.BlockID { 599 if m != nil { 600 return m.BlockID 601 } 602 return types.BlockID{} 603 } 604 605 func (m *VoteSetBits) GetVotes() bits.BitArray { 606 if m != nil { 607 return m.Votes 608 } 609 return bits.BitArray{} 610 } 611 612 type Message struct { 613 // Types that are valid to be assigned to Sum: 614 // *Message_NewRoundStep 615 // *Message_NewValidBlock 616 // *Message_Proposal 617 // *Message_ProposalPol 618 // *Message_BlockPart 619 // *Message_Vote 620 // *Message_HasVote 621 // *Message_VoteSetMaj23 622 // *Message_VoteSetBits 623 Sum isMessage_Sum `protobuf_oneof:"sum"` 624 } 625 626 func (m *Message) Reset() { *m = Message{} } 627 func (m *Message) String() string { return proto.CompactTextString(m) } 628 func (*Message) ProtoMessage() {} 629 func (*Message) Descriptor() ([]byte, []int) { 630 return fileDescriptor_81a22d2efc008981, []int{9} 631 } 632 func (m *Message) XXX_Unmarshal(b []byte) error { 633 return m.Unmarshal(b) 634 } 635 func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 636 if deterministic { 637 return xxx_messageInfo_Message.Marshal(b, m, deterministic) 638 } else { 639 b = b[:cap(b)] 640 n, err := m.MarshalToSizedBuffer(b) 641 if err != nil { 642 return nil, err 643 } 644 return b[:n], nil 645 } 646 } 647 func (m *Message) XXX_Merge(src proto.Message) { 648 xxx_messageInfo_Message.Merge(m, src) 649 } 650 func (m *Message) XXX_Size() int { 651 return m.Size() 652 } 653 func (m *Message) XXX_DiscardUnknown() { 654 xxx_messageInfo_Message.DiscardUnknown(m) 655 } 656 657 var xxx_messageInfo_Message proto.InternalMessageInfo 658 659 type isMessage_Sum interface { 660 isMessage_Sum() 661 MarshalTo([]byte) (int, error) 662 Size() int 663 } 664 665 type Message_NewRoundStep struct { 666 NewRoundStep *NewRoundStep `protobuf:"bytes,1,opt,name=new_round_step,json=newRoundStep,proto3,oneof" json:"new_round_step,omitempty"` 667 } 668 type Message_NewValidBlock struct { 669 NewValidBlock *NewValidBlock `protobuf:"bytes,2,opt,name=new_valid_block,json=newValidBlock,proto3,oneof" json:"new_valid_block,omitempty"` 670 } 671 type Message_Proposal struct { 672 Proposal *Proposal `protobuf:"bytes,3,opt,name=proposal,proto3,oneof" json:"proposal,omitempty"` 673 } 674 type Message_ProposalPol struct { 675 ProposalPol *ProposalPOL `protobuf:"bytes,4,opt,name=proposal_pol,json=proposalPol,proto3,oneof" json:"proposal_pol,omitempty"` 676 } 677 type Message_BlockPart struct { 678 BlockPart *BlockPart `protobuf:"bytes,5,opt,name=block_part,json=blockPart,proto3,oneof" json:"block_part,omitempty"` 679 } 680 type Message_Vote struct { 681 Vote *Vote `protobuf:"bytes,6,opt,name=vote,proto3,oneof" json:"vote,omitempty"` 682 } 683 type Message_HasVote struct { 684 HasVote *HasVote `protobuf:"bytes,7,opt,name=has_vote,json=hasVote,proto3,oneof" json:"has_vote,omitempty"` 685 } 686 type Message_VoteSetMaj23 struct { 687 VoteSetMaj23 *VoteSetMaj23 `protobuf:"bytes,8,opt,name=vote_set_maj23,json=voteSetMaj23,proto3,oneof" json:"vote_set_maj23,omitempty"` 688 } 689 type Message_VoteSetBits struct { 690 VoteSetBits *VoteSetBits `protobuf:"bytes,9,opt,name=vote_set_bits,json=voteSetBits,proto3,oneof" json:"vote_set_bits,omitempty"` 691 } 692 693 func (*Message_NewRoundStep) isMessage_Sum() {} 694 func (*Message_NewValidBlock) isMessage_Sum() {} 695 func (*Message_Proposal) isMessage_Sum() {} 696 func (*Message_ProposalPol) isMessage_Sum() {} 697 func (*Message_BlockPart) isMessage_Sum() {} 698 func (*Message_Vote) isMessage_Sum() {} 699 func (*Message_HasVote) isMessage_Sum() {} 700 func (*Message_VoteSetMaj23) isMessage_Sum() {} 701 func (*Message_VoteSetBits) isMessage_Sum() {} 702 703 func (m *Message) GetSum() isMessage_Sum { 704 if m != nil { 705 return m.Sum 706 } 707 return nil 708 } 709 710 func (m *Message) GetNewRoundStep() *NewRoundStep { 711 if x, ok := m.GetSum().(*Message_NewRoundStep); ok { 712 return x.NewRoundStep 713 } 714 return nil 715 } 716 717 func (m *Message) GetNewValidBlock() *NewValidBlock { 718 if x, ok := m.GetSum().(*Message_NewValidBlock); ok { 719 return x.NewValidBlock 720 } 721 return nil 722 } 723 724 func (m *Message) GetProposal() *Proposal { 725 if x, ok := m.GetSum().(*Message_Proposal); ok { 726 return x.Proposal 727 } 728 return nil 729 } 730 731 func (m *Message) GetProposalPol() *ProposalPOL { 732 if x, ok := m.GetSum().(*Message_ProposalPol); ok { 733 return x.ProposalPol 734 } 735 return nil 736 } 737 738 func (m *Message) GetBlockPart() *BlockPart { 739 if x, ok := m.GetSum().(*Message_BlockPart); ok { 740 return x.BlockPart 741 } 742 return nil 743 } 744 745 func (m *Message) GetVote() *Vote { 746 if x, ok := m.GetSum().(*Message_Vote); ok { 747 return x.Vote 748 } 749 return nil 750 } 751 752 func (m *Message) GetHasVote() *HasVote { 753 if x, ok := m.GetSum().(*Message_HasVote); ok { 754 return x.HasVote 755 } 756 return nil 757 } 758 759 func (m *Message) GetVoteSetMaj23() *VoteSetMaj23 { 760 if x, ok := m.GetSum().(*Message_VoteSetMaj23); ok { 761 return x.VoteSetMaj23 762 } 763 return nil 764 } 765 766 func (m *Message) GetVoteSetBits() *VoteSetBits { 767 if x, ok := m.GetSum().(*Message_VoteSetBits); ok { 768 return x.VoteSetBits 769 } 770 return nil 771 } 772 773 // XXX_OneofWrappers is for the internal use of the proto package. 774 func (*Message) XXX_OneofWrappers() []interface{} { 775 return []interface{}{ 776 (*Message_NewRoundStep)(nil), 777 (*Message_NewValidBlock)(nil), 778 (*Message_Proposal)(nil), 779 (*Message_ProposalPol)(nil), 780 (*Message_BlockPart)(nil), 781 (*Message_Vote)(nil), 782 (*Message_HasVote)(nil), 783 (*Message_VoteSetMaj23)(nil), 784 (*Message_VoteSetBits)(nil), 785 } 786 } 787 788 func init() { 789 proto.RegisterType((*NewRoundStep)(nil), "tendermint.consensus.NewRoundStep") 790 proto.RegisterType((*NewValidBlock)(nil), "tendermint.consensus.NewValidBlock") 791 proto.RegisterType((*Proposal)(nil), "tendermint.consensus.Proposal") 792 proto.RegisterType((*ProposalPOL)(nil), "tendermint.consensus.ProposalPOL") 793 proto.RegisterType((*BlockPart)(nil), "tendermint.consensus.BlockPart") 794 proto.RegisterType((*Vote)(nil), "tendermint.consensus.Vote") 795 proto.RegisterType((*HasVote)(nil), "tendermint.consensus.HasVote") 796 proto.RegisterType((*VoteSetMaj23)(nil), "tendermint.consensus.VoteSetMaj23") 797 proto.RegisterType((*VoteSetBits)(nil), "tendermint.consensus.VoteSetBits") 798 proto.RegisterType((*Message)(nil), "tendermint.consensus.Message") 799 } 800 801 func init() { proto.RegisterFile("tendermint/consensus/types.proto", fileDescriptor_81a22d2efc008981) } 802 803 var fileDescriptor_81a22d2efc008981 = []byte{ 804 // 853 bytes of a gzipped FileDescriptorProto 805 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0x4f, 0x8f, 0xdb, 0x44, 806 0x14, 0xb7, 0x59, 0x67, 0x93, 0x7d, 0xde, 0xec, 0xc2, 0x68, 0x5b, 0x85, 0x00, 0x49, 0x30, 0x97, 807 0x15, 0x42, 0x0e, 0xca, 0x1e, 0x90, 0x0a, 0x12, 0x60, 0xfe, 0xd4, 0xad, 0x9a, 0x36, 0x72, 0x4a, 808 0x85, 0xb8, 0x58, 0x4e, 0x3c, 0x4a, 0x86, 0xc6, 0x1e, 0xcb, 0x33, 0xc9, 0xb2, 0x57, 0x3e, 0x01, 809 0x1f, 0x80, 0xaf, 0x81, 0xc4, 0x47, 0xe8, 0xb1, 0x47, 0x4e, 0x15, 0xca, 0x7e, 0x04, 0x04, 0x67, 810 0x34, 0xe3, 0x49, 0x3c, 0xa1, 0xde, 0x85, 0xbd, 0x20, 0xf5, 0x36, 0xe3, 0xf7, 0xde, 0x6f, 0xde, 811 0xfc, 0xde, 0x7b, 0x3f, 0x0f, 0xf4, 0x38, 0x4e, 0x63, 0x9c, 0x27, 0x24, 0xe5, 0xfd, 0x29, 0x4d, 812 0x19, 0x4e, 0xd9, 0x92, 0xf5, 0xf9, 0x45, 0x86, 0x99, 0x9b, 0xe5, 0x94, 0x53, 0x74, 0x52, 0x7a, 813 0xb8, 0x5b, 0x8f, 0xf6, 0xc9, 0x8c, 0xce, 0xa8, 0x74, 0xe8, 0x8b, 0x55, 0xe1, 0xdb, 0x7e, 0x5b, 814 0x43, 0x93, 0x18, 0x3a, 0x52, 0x5b, 0x3f, 0x6b, 0x41, 0x26, 0xac, 0x3f, 0x21, 0x7c, 0xc7, 0xc3, 815 0xf9, 0xc5, 0x84, 0xc3, 0x87, 0xf8, 0x3c, 0xa0, 0xcb, 0x34, 0x1e, 0x73, 0x9c, 0xa1, 0xdb, 0xb0, 816 0x3f, 0xc7, 0x64, 0x36, 0xe7, 0x2d, 0xb3, 0x67, 0x9e, 0xee, 0x05, 0x6a, 0x87, 0x4e, 0xa0, 0x96, 817 0x0b, 0xa7, 0xd6, 0x6b, 0x3d, 0xf3, 0xb4, 0x16, 0x14, 0x1b, 0x84, 0xc0, 0x62, 0x1c, 0x67, 0xad, 818 0xbd, 0x9e, 0x79, 0xda, 0x0c, 0xe4, 0x1a, 0x7d, 0x04, 0x2d, 0x86, 0xa7, 0x34, 0x8d, 0x59, 0xc8, 819 0x48, 0x3a, 0xc5, 0x21, 0xe3, 0x51, 0xce, 0x43, 0x4e, 0x12, 0xdc, 0xb2, 0x24, 0xe6, 0x2d, 0x65, 820 0x1f, 0x0b, 0xf3, 0x58, 0x58, 0x1f, 0x93, 0x04, 0xa3, 0xf7, 0xe1, 0x8d, 0x45, 0xc4, 0x78, 0x38, 821 0xa5, 0x49, 0x42, 0x78, 0x58, 0x1c, 0x57, 0x93, 0xc7, 0x1d, 0x0b, 0xc3, 0x17, 0xf2, 0xbb, 0x4c, 822 0xd5, 0xf9, 0xd3, 0x84, 0xe6, 0x43, 0x7c, 0xfe, 0x24, 0x5a, 0x90, 0xd8, 0x5b, 0xd0, 0xe9, 0xd3, 823 0x1b, 0x26, 0xfe, 0x2d, 0xdc, 0x9a, 0x88, 0xb0, 0x30, 0x13, 0xb9, 0x31, 0xcc, 0xc3, 0x39, 0x8e, 824 0x62, 0x9c, 0xcb, 0x9b, 0xd8, 0x83, 0xae, 0xab, 0xd5, 0xa0, 0xe0, 0x6b, 0x14, 0xe5, 0x7c, 0x8c, 825 0xb9, 0x2f, 0xdd, 0x3c, 0xeb, 0xd9, 0x8b, 0xae, 0x11, 0x20, 0x89, 0xb1, 0x63, 0x41, 0x9f, 0x82, 826 0x5d, 0x22, 0x33, 0x79, 0x63, 0x7b, 0xd0, 0xd1, 0xf1, 0x44, 0x25, 0x5c, 0x51, 0x09, 0xd7, 0x23, 827 0xfc, 0xf3, 0x3c, 0x8f, 0x2e, 0x02, 0xd8, 0x02, 0x31, 0xf4, 0x16, 0x1c, 0x10, 0xa6, 0x48, 0x90, 828 0xd7, 0x6f, 0x04, 0x0d, 0xc2, 0x8a, 0xcb, 0x3b, 0x3e, 0x34, 0x46, 0x39, 0xcd, 0x28, 0x8b, 0x16, 829 0xe8, 0x13, 0x68, 0x64, 0x6a, 0x2d, 0xef, 0x6c, 0x0f, 0xda, 0x15, 0x69, 0x2b, 0x0f, 0x95, 0xf1, 830 0x36, 0xc2, 0xf9, 0xd9, 0x04, 0x7b, 0x63, 0x1c, 0x3d, 0x7a, 0x70, 0x25, 0x7f, 0x1f, 0x00, 0xda, 831 0xc4, 0x84, 0x19, 0x5d, 0x84, 0x3a, 0x99, 0xaf, 0x6f, 0x2c, 0x23, 0xba, 0x90, 0x75, 0x41, 0x77, 832 0xe1, 0x50, 0xf7, 0x56, 0x74, 0xfe, 0xcb, 0xf5, 0x55, 0x6e, 0xb6, 0x86, 0xe6, 0x3c, 0x85, 0x03, 833 0x6f, 0xc3, 0xc9, 0x0d, 0x6b, 0xfb, 0x21, 0x58, 0x82, 0x7b, 0x75, 0xf6, 0xed, 0xea, 0x52, 0xaa, 834 0x33, 0xa5, 0xa7, 0x33, 0x00, 0xeb, 0x09, 0xe5, 0xa2, 0x03, 0xad, 0x15, 0xe5, 0x58, 0xb1, 0x59, 835 0x11, 0x29, 0xbc, 0x02, 0xe9, 0xe3, 0xfc, 0x68, 0x42, 0xdd, 0x8f, 0x98, 0x8c, 0xbb, 0x59, 0x7e, 836 0x67, 0x60, 0x09, 0x34, 0x99, 0xdf, 0x51, 0x55, 0xab, 0x8d, 0xc9, 0x2c, 0xc5, 0xf1, 0x90, 0xcd, 837 0x1e, 0x5f, 0x64, 0x38, 0x90, 0xce, 0x02, 0x8a, 0xa4, 0x31, 0xfe, 0x41, 0x36, 0x54, 0x2d, 0x28, 838 0x36, 0xce, 0xaf, 0x26, 0x1c, 0x8a, 0x0c, 0xc6, 0x98, 0x0f, 0xa3, 0xef, 0x07, 0x67, 0xff, 0x47, 839 0x26, 0x5f, 0x41, 0xa3, 0x68, 0x70, 0x12, 0xab, 0xee, 0x7e, 0xf3, 0xe5, 0x40, 0x59, 0xbb, 0x7b, 840 0x5f, 0x7a, 0xc7, 0x82, 0xe5, 0xf5, 0x8b, 0x6e, 0x5d, 0x7d, 0x08, 0xea, 0x32, 0xf6, 0x5e, 0xec, 841 0xfc, 0x61, 0x82, 0xad, 0x52, 0xf7, 0x08, 0x67, 0xaf, 0x4e, 0xe6, 0xe8, 0x0e, 0xd4, 0x44, 0x07, 842 0x30, 0x39, 0x9c, 0xff, 0xb5, 0xb9, 0x8b, 0x10, 0xe7, 0x2f, 0x0b, 0xea, 0x43, 0xcc, 0x58, 0x34, 843 0xc3, 0xe8, 0x3e, 0x1c, 0xa5, 0xf8, 0xbc, 0x18, 0xa8, 0x50, 0xca, 0x68, 0xd1, 0x77, 0x8e, 0x5b, 844 0xf5, 0x03, 0x70, 0x75, 0x99, 0xf6, 0x8d, 0xe0, 0x30, 0xd5, 0x65, 0x7b, 0x08, 0xc7, 0x02, 0x6b, 845 0x25, 0xf4, 0x30, 0x94, 0x89, 0x4a, 0xbe, 0xec, 0xc1, 0x7b, 0x57, 0x82, 0x95, 0xda, 0xe9, 0x1b, 846 0x41, 0x33, 0xdd, 0x11, 0x53, 0x5d, 0x5a, 0x2a, 0x46, 0xb8, 0xc4, 0xd9, 0x28, 0x88, 0xaf, 0x49, 847 0x0b, 0xfa, 0xfa, 0x1f, 0x22, 0x50, 0x70, 0xfd, 0xee, 0xf5, 0x08, 0xa3, 0x47, 0x0f, 0xfc, 0x5d, 848 0x0d, 0x40, 0x9f, 0x01, 0x94, 0x52, 0xaa, 0xd8, 0xee, 0x56, 0xa3, 0x6c, 0xb5, 0xc2, 0x37, 0x82, 849 0x83, 0xad, 0x98, 0x0a, 0x29, 0x90, 0x03, 0xbd, 0xff, 0xb2, 0x3c, 0x96, 0xb1, 0xa2, 0x0b, 0x7d, 850 0xa3, 0x18, 0x6b, 0x74, 0x07, 0x1a, 0xf3, 0x88, 0x85, 0x32, 0xaa, 0x2e, 0xa3, 0xde, 0xa9, 0x8e, 851 0x52, 0xb3, 0xef, 0x1b, 0x41, 0x7d, 0xae, 0x64, 0xe0, 0x3e, 0x1c, 0x89, 0x38, 0xf9, 0x3b, 0x49, 852 0xc4, 0x38, 0xb6, 0x1a, 0xd7, 0x15, 0x54, 0x1f, 0x5c, 0x51, 0xd0, 0x95, 0x3e, 0xc8, 0x77, 0xa1, 853 0xb9, 0xc5, 0x12, 0xfd, 0xd4, 0x3a, 0xb8, 0x8e, 0x44, 0x6d, 0x90, 0x04, 0x89, 0xab, 0x72, 0xeb, 854 0xd5, 0x60, 0x8f, 0x2d, 0x13, 0xef, 0x9b, 0x67, 0xeb, 0x8e, 0xf9, 0x7c, 0xdd, 0x31, 0x7f, 0x5f, 855 0x77, 0xcc, 0x9f, 0x2e, 0x3b, 0xc6, 0xf3, 0xcb, 0x8e, 0xf1, 0xdb, 0x65, 0xc7, 0xf8, 0xee, 0xe3, 856 0x19, 0xe1, 0xf3, 0xe5, 0xc4, 0x9d, 0xd2, 0xa4, 0xaf, 0xbf, 0x26, 0xca, 0x65, 0xf1, 0xea, 0xa8, 857 0x7a, 0xb7, 0x4c, 0xf6, 0xa5, 0xed, 0xec, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc7, 0x5c, 0x91, 858 0x04, 0xd6, 0x08, 0x00, 0x00, 859 } 860 861 func (m *NewRoundStep) Marshal() (dAtA []byte, err error) { 862 size := m.Size() 863 dAtA = make([]byte, size) 864 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 865 if err != nil { 866 return nil, err 867 } 868 return dAtA[:n], nil 869 } 870 871 func (m *NewRoundStep) MarshalTo(dAtA []byte) (int, error) { 872 size := m.Size() 873 return m.MarshalToSizedBuffer(dAtA[:size]) 874 } 875 876 func (m *NewRoundStep) MarshalToSizedBuffer(dAtA []byte) (int, error) { 877 i := len(dAtA) 878 _ = i 879 var l int 880 _ = l 881 if m.LastCommitRound != 0 { 882 i = encodeVarintTypes(dAtA, i, uint64(m.LastCommitRound)) 883 i-- 884 dAtA[i] = 0x28 885 } 886 if m.SecondsSinceStartTime != 0 { 887 i = encodeVarintTypes(dAtA, i, uint64(m.SecondsSinceStartTime)) 888 i-- 889 dAtA[i] = 0x20 890 } 891 if m.Step != 0 { 892 i = encodeVarintTypes(dAtA, i, uint64(m.Step)) 893 i-- 894 dAtA[i] = 0x18 895 } 896 if m.Round != 0 { 897 i = encodeVarintTypes(dAtA, i, uint64(m.Round)) 898 i-- 899 dAtA[i] = 0x10 900 } 901 if m.Height != 0 { 902 i = encodeVarintTypes(dAtA, i, uint64(m.Height)) 903 i-- 904 dAtA[i] = 0x8 905 } 906 return len(dAtA) - i, nil 907 } 908 909 func (m *NewValidBlock) Marshal() (dAtA []byte, err error) { 910 size := m.Size() 911 dAtA = make([]byte, size) 912 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 913 if err != nil { 914 return nil, err 915 } 916 return dAtA[:n], nil 917 } 918 919 func (m *NewValidBlock) MarshalTo(dAtA []byte) (int, error) { 920 size := m.Size() 921 return m.MarshalToSizedBuffer(dAtA[:size]) 922 } 923 924 func (m *NewValidBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { 925 i := len(dAtA) 926 _ = i 927 var l int 928 _ = l 929 if m.IsCommit { 930 i-- 931 if m.IsCommit { 932 dAtA[i] = 1 933 } else { 934 dAtA[i] = 0 935 } 936 i-- 937 dAtA[i] = 0x28 938 } 939 if m.BlockParts != nil { 940 { 941 size, err := m.BlockParts.MarshalToSizedBuffer(dAtA[:i]) 942 if err != nil { 943 return 0, err 944 } 945 i -= size 946 i = encodeVarintTypes(dAtA, i, uint64(size)) 947 } 948 i-- 949 dAtA[i] = 0x22 950 } 951 { 952 size, err := m.BlockPartSetHeader.MarshalToSizedBuffer(dAtA[:i]) 953 if err != nil { 954 return 0, err 955 } 956 i -= size 957 i = encodeVarintTypes(dAtA, i, uint64(size)) 958 } 959 i-- 960 dAtA[i] = 0x1a 961 if m.Round != 0 { 962 i = encodeVarintTypes(dAtA, i, uint64(m.Round)) 963 i-- 964 dAtA[i] = 0x10 965 } 966 if m.Height != 0 { 967 i = encodeVarintTypes(dAtA, i, uint64(m.Height)) 968 i-- 969 dAtA[i] = 0x8 970 } 971 return len(dAtA) - i, nil 972 } 973 974 func (m *Proposal) Marshal() (dAtA []byte, err error) { 975 size := m.Size() 976 dAtA = make([]byte, size) 977 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 978 if err != nil { 979 return nil, err 980 } 981 return dAtA[:n], nil 982 } 983 984 func (m *Proposal) MarshalTo(dAtA []byte) (int, error) { 985 size := m.Size() 986 return m.MarshalToSizedBuffer(dAtA[:size]) 987 } 988 989 func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { 990 i := len(dAtA) 991 _ = i 992 var l int 993 _ = l 994 { 995 size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) 996 if err != nil { 997 return 0, err 998 } 999 i -= size 1000 i = encodeVarintTypes(dAtA, i, uint64(size)) 1001 } 1002 i-- 1003 dAtA[i] = 0xa 1004 return len(dAtA) - i, nil 1005 } 1006 1007 func (m *ProposalPOL) Marshal() (dAtA []byte, err error) { 1008 size := m.Size() 1009 dAtA = make([]byte, size) 1010 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1011 if err != nil { 1012 return nil, err 1013 } 1014 return dAtA[:n], nil 1015 } 1016 1017 func (m *ProposalPOL) MarshalTo(dAtA []byte) (int, error) { 1018 size := m.Size() 1019 return m.MarshalToSizedBuffer(dAtA[:size]) 1020 } 1021 1022 func (m *ProposalPOL) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1023 i := len(dAtA) 1024 _ = i 1025 var l int 1026 _ = l 1027 { 1028 size, err := m.ProposalPol.MarshalToSizedBuffer(dAtA[:i]) 1029 if err != nil { 1030 return 0, err 1031 } 1032 i -= size 1033 i = encodeVarintTypes(dAtA, i, uint64(size)) 1034 } 1035 i-- 1036 dAtA[i] = 0x1a 1037 if m.ProposalPolRound != 0 { 1038 i = encodeVarintTypes(dAtA, i, uint64(m.ProposalPolRound)) 1039 i-- 1040 dAtA[i] = 0x10 1041 } 1042 if m.Height != 0 { 1043 i = encodeVarintTypes(dAtA, i, uint64(m.Height)) 1044 i-- 1045 dAtA[i] = 0x8 1046 } 1047 return len(dAtA) - i, nil 1048 } 1049 1050 func (m *BlockPart) Marshal() (dAtA []byte, err error) { 1051 size := m.Size() 1052 dAtA = make([]byte, size) 1053 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1054 if err != nil { 1055 return nil, err 1056 } 1057 return dAtA[:n], nil 1058 } 1059 1060 func (m *BlockPart) MarshalTo(dAtA []byte) (int, error) { 1061 size := m.Size() 1062 return m.MarshalToSizedBuffer(dAtA[:size]) 1063 } 1064 1065 func (m *BlockPart) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1066 i := len(dAtA) 1067 _ = i 1068 var l int 1069 _ = l 1070 { 1071 size, err := m.Part.MarshalToSizedBuffer(dAtA[:i]) 1072 if err != nil { 1073 return 0, err 1074 } 1075 i -= size 1076 i = encodeVarintTypes(dAtA, i, uint64(size)) 1077 } 1078 i-- 1079 dAtA[i] = 0x1a 1080 if m.Round != 0 { 1081 i = encodeVarintTypes(dAtA, i, uint64(m.Round)) 1082 i-- 1083 dAtA[i] = 0x10 1084 } 1085 if m.Height != 0 { 1086 i = encodeVarintTypes(dAtA, i, uint64(m.Height)) 1087 i-- 1088 dAtA[i] = 0x8 1089 } 1090 return len(dAtA) - i, nil 1091 } 1092 1093 func (m *Vote) Marshal() (dAtA []byte, err error) { 1094 size := m.Size() 1095 dAtA = make([]byte, size) 1096 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1097 if err != nil { 1098 return nil, err 1099 } 1100 return dAtA[:n], nil 1101 } 1102 1103 func (m *Vote) MarshalTo(dAtA []byte) (int, error) { 1104 size := m.Size() 1105 return m.MarshalToSizedBuffer(dAtA[:size]) 1106 } 1107 1108 func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1109 i := len(dAtA) 1110 _ = i 1111 var l int 1112 _ = l 1113 if m.Vote != nil { 1114 { 1115 size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i]) 1116 if err != nil { 1117 return 0, err 1118 } 1119 i -= size 1120 i = encodeVarintTypes(dAtA, i, uint64(size)) 1121 } 1122 i-- 1123 dAtA[i] = 0xa 1124 } 1125 return len(dAtA) - i, nil 1126 } 1127 1128 func (m *HasVote) Marshal() (dAtA []byte, err error) { 1129 size := m.Size() 1130 dAtA = make([]byte, size) 1131 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1132 if err != nil { 1133 return nil, err 1134 } 1135 return dAtA[:n], nil 1136 } 1137 1138 func (m *HasVote) MarshalTo(dAtA []byte) (int, error) { 1139 size := m.Size() 1140 return m.MarshalToSizedBuffer(dAtA[:size]) 1141 } 1142 1143 func (m *HasVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1144 i := len(dAtA) 1145 _ = i 1146 var l int 1147 _ = l 1148 if m.Index != 0 { 1149 i = encodeVarintTypes(dAtA, i, uint64(m.Index)) 1150 i-- 1151 dAtA[i] = 0x20 1152 } 1153 if m.Type != 0 { 1154 i = encodeVarintTypes(dAtA, i, uint64(m.Type)) 1155 i-- 1156 dAtA[i] = 0x18 1157 } 1158 if m.Round != 0 { 1159 i = encodeVarintTypes(dAtA, i, uint64(m.Round)) 1160 i-- 1161 dAtA[i] = 0x10 1162 } 1163 if m.Height != 0 { 1164 i = encodeVarintTypes(dAtA, i, uint64(m.Height)) 1165 i-- 1166 dAtA[i] = 0x8 1167 } 1168 return len(dAtA) - i, nil 1169 } 1170 1171 func (m *VoteSetMaj23) Marshal() (dAtA []byte, err error) { 1172 size := m.Size() 1173 dAtA = make([]byte, size) 1174 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1175 if err != nil { 1176 return nil, err 1177 } 1178 return dAtA[:n], nil 1179 } 1180 1181 func (m *VoteSetMaj23) MarshalTo(dAtA []byte) (int, error) { 1182 size := m.Size() 1183 return m.MarshalToSizedBuffer(dAtA[:size]) 1184 } 1185 1186 func (m *VoteSetMaj23) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1187 i := len(dAtA) 1188 _ = i 1189 var l int 1190 _ = l 1191 { 1192 size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) 1193 if err != nil { 1194 return 0, err 1195 } 1196 i -= size 1197 i = encodeVarintTypes(dAtA, i, uint64(size)) 1198 } 1199 i-- 1200 dAtA[i] = 0x22 1201 if m.Type != 0 { 1202 i = encodeVarintTypes(dAtA, i, uint64(m.Type)) 1203 i-- 1204 dAtA[i] = 0x18 1205 } 1206 if m.Round != 0 { 1207 i = encodeVarintTypes(dAtA, i, uint64(m.Round)) 1208 i-- 1209 dAtA[i] = 0x10 1210 } 1211 if m.Height != 0 { 1212 i = encodeVarintTypes(dAtA, i, uint64(m.Height)) 1213 i-- 1214 dAtA[i] = 0x8 1215 } 1216 return len(dAtA) - i, nil 1217 } 1218 1219 func (m *VoteSetBits) Marshal() (dAtA []byte, err error) { 1220 size := m.Size() 1221 dAtA = make([]byte, size) 1222 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1223 if err != nil { 1224 return nil, err 1225 } 1226 return dAtA[:n], nil 1227 } 1228 1229 func (m *VoteSetBits) MarshalTo(dAtA []byte) (int, error) { 1230 size := m.Size() 1231 return m.MarshalToSizedBuffer(dAtA[:size]) 1232 } 1233 1234 func (m *VoteSetBits) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1235 i := len(dAtA) 1236 _ = i 1237 var l int 1238 _ = l 1239 { 1240 size, err := m.Votes.MarshalToSizedBuffer(dAtA[:i]) 1241 if err != nil { 1242 return 0, err 1243 } 1244 i -= size 1245 i = encodeVarintTypes(dAtA, i, uint64(size)) 1246 } 1247 i-- 1248 dAtA[i] = 0x2a 1249 { 1250 size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) 1251 if err != nil { 1252 return 0, err 1253 } 1254 i -= size 1255 i = encodeVarintTypes(dAtA, i, uint64(size)) 1256 } 1257 i-- 1258 dAtA[i] = 0x22 1259 if m.Type != 0 { 1260 i = encodeVarintTypes(dAtA, i, uint64(m.Type)) 1261 i-- 1262 dAtA[i] = 0x18 1263 } 1264 if m.Round != 0 { 1265 i = encodeVarintTypes(dAtA, i, uint64(m.Round)) 1266 i-- 1267 dAtA[i] = 0x10 1268 } 1269 if m.Height != 0 { 1270 i = encodeVarintTypes(dAtA, i, uint64(m.Height)) 1271 i-- 1272 dAtA[i] = 0x8 1273 } 1274 return len(dAtA) - i, nil 1275 } 1276 1277 func (m *Message) Marshal() (dAtA []byte, err error) { 1278 size := m.Size() 1279 dAtA = make([]byte, size) 1280 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1281 if err != nil { 1282 return nil, err 1283 } 1284 return dAtA[:n], nil 1285 } 1286 1287 func (m *Message) MarshalTo(dAtA []byte) (int, error) { 1288 size := m.Size() 1289 return m.MarshalToSizedBuffer(dAtA[:size]) 1290 } 1291 1292 func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1293 i := len(dAtA) 1294 _ = i 1295 var l int 1296 _ = l 1297 if m.Sum != nil { 1298 { 1299 size := m.Sum.Size() 1300 i -= size 1301 if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { 1302 return 0, err 1303 } 1304 } 1305 } 1306 return len(dAtA) - i, nil 1307 } 1308 1309 func (m *Message_NewRoundStep) MarshalTo(dAtA []byte) (int, error) { 1310 size := m.Size() 1311 return m.MarshalToSizedBuffer(dAtA[:size]) 1312 } 1313 1314 func (m *Message_NewRoundStep) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1315 i := len(dAtA) 1316 if m.NewRoundStep != nil { 1317 { 1318 size, err := m.NewRoundStep.MarshalToSizedBuffer(dAtA[:i]) 1319 if err != nil { 1320 return 0, err 1321 } 1322 i -= size 1323 i = encodeVarintTypes(dAtA, i, uint64(size)) 1324 } 1325 i-- 1326 dAtA[i] = 0xa 1327 } 1328 return len(dAtA) - i, nil 1329 } 1330 func (m *Message_NewValidBlock) MarshalTo(dAtA []byte) (int, error) { 1331 size := m.Size() 1332 return m.MarshalToSizedBuffer(dAtA[:size]) 1333 } 1334 1335 func (m *Message_NewValidBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1336 i := len(dAtA) 1337 if m.NewValidBlock != nil { 1338 { 1339 size, err := m.NewValidBlock.MarshalToSizedBuffer(dAtA[:i]) 1340 if err != nil { 1341 return 0, err 1342 } 1343 i -= size 1344 i = encodeVarintTypes(dAtA, i, uint64(size)) 1345 } 1346 i-- 1347 dAtA[i] = 0x12 1348 } 1349 return len(dAtA) - i, nil 1350 } 1351 func (m *Message_Proposal) MarshalTo(dAtA []byte) (int, error) { 1352 size := m.Size() 1353 return m.MarshalToSizedBuffer(dAtA[:size]) 1354 } 1355 1356 func (m *Message_Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1357 i := len(dAtA) 1358 if m.Proposal != nil { 1359 { 1360 size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) 1361 if err != nil { 1362 return 0, err 1363 } 1364 i -= size 1365 i = encodeVarintTypes(dAtA, i, uint64(size)) 1366 } 1367 i-- 1368 dAtA[i] = 0x1a 1369 } 1370 return len(dAtA) - i, nil 1371 } 1372 func (m *Message_ProposalPol) MarshalTo(dAtA []byte) (int, error) { 1373 size := m.Size() 1374 return m.MarshalToSizedBuffer(dAtA[:size]) 1375 } 1376 1377 func (m *Message_ProposalPol) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1378 i := len(dAtA) 1379 if m.ProposalPol != nil { 1380 { 1381 size, err := m.ProposalPol.MarshalToSizedBuffer(dAtA[:i]) 1382 if err != nil { 1383 return 0, err 1384 } 1385 i -= size 1386 i = encodeVarintTypes(dAtA, i, uint64(size)) 1387 } 1388 i-- 1389 dAtA[i] = 0x22 1390 } 1391 return len(dAtA) - i, nil 1392 } 1393 func (m *Message_BlockPart) MarshalTo(dAtA []byte) (int, error) { 1394 size := m.Size() 1395 return m.MarshalToSizedBuffer(dAtA[:size]) 1396 } 1397 1398 func (m *Message_BlockPart) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1399 i := len(dAtA) 1400 if m.BlockPart != nil { 1401 { 1402 size, err := m.BlockPart.MarshalToSizedBuffer(dAtA[:i]) 1403 if err != nil { 1404 return 0, err 1405 } 1406 i -= size 1407 i = encodeVarintTypes(dAtA, i, uint64(size)) 1408 } 1409 i-- 1410 dAtA[i] = 0x2a 1411 } 1412 return len(dAtA) - i, nil 1413 } 1414 func (m *Message_Vote) MarshalTo(dAtA []byte) (int, error) { 1415 size := m.Size() 1416 return m.MarshalToSizedBuffer(dAtA[:size]) 1417 } 1418 1419 func (m *Message_Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1420 i := len(dAtA) 1421 if m.Vote != nil { 1422 { 1423 size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i]) 1424 if err != nil { 1425 return 0, err 1426 } 1427 i -= size 1428 i = encodeVarintTypes(dAtA, i, uint64(size)) 1429 } 1430 i-- 1431 dAtA[i] = 0x32 1432 } 1433 return len(dAtA) - i, nil 1434 } 1435 func (m *Message_HasVote) MarshalTo(dAtA []byte) (int, error) { 1436 size := m.Size() 1437 return m.MarshalToSizedBuffer(dAtA[:size]) 1438 } 1439 1440 func (m *Message_HasVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1441 i := len(dAtA) 1442 if m.HasVote != nil { 1443 { 1444 size, err := m.HasVote.MarshalToSizedBuffer(dAtA[:i]) 1445 if err != nil { 1446 return 0, err 1447 } 1448 i -= size 1449 i = encodeVarintTypes(dAtA, i, uint64(size)) 1450 } 1451 i-- 1452 dAtA[i] = 0x3a 1453 } 1454 return len(dAtA) - i, nil 1455 } 1456 func (m *Message_VoteSetMaj23) MarshalTo(dAtA []byte) (int, error) { 1457 size := m.Size() 1458 return m.MarshalToSizedBuffer(dAtA[:size]) 1459 } 1460 1461 func (m *Message_VoteSetMaj23) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1462 i := len(dAtA) 1463 if m.VoteSetMaj23 != nil { 1464 { 1465 size, err := m.VoteSetMaj23.MarshalToSizedBuffer(dAtA[:i]) 1466 if err != nil { 1467 return 0, err 1468 } 1469 i -= size 1470 i = encodeVarintTypes(dAtA, i, uint64(size)) 1471 } 1472 i-- 1473 dAtA[i] = 0x42 1474 } 1475 return len(dAtA) - i, nil 1476 } 1477 func (m *Message_VoteSetBits) MarshalTo(dAtA []byte) (int, error) { 1478 size := m.Size() 1479 return m.MarshalToSizedBuffer(dAtA[:size]) 1480 } 1481 1482 func (m *Message_VoteSetBits) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1483 i := len(dAtA) 1484 if m.VoteSetBits != nil { 1485 { 1486 size, err := m.VoteSetBits.MarshalToSizedBuffer(dAtA[:i]) 1487 if err != nil { 1488 return 0, err 1489 } 1490 i -= size 1491 i = encodeVarintTypes(dAtA, i, uint64(size)) 1492 } 1493 i-- 1494 dAtA[i] = 0x4a 1495 } 1496 return len(dAtA) - i, nil 1497 } 1498 func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { 1499 offset -= sovTypes(v) 1500 base := offset 1501 for v >= 1<<7 { 1502 dAtA[offset] = uint8(v&0x7f | 0x80) 1503 v >>= 7 1504 offset++ 1505 } 1506 dAtA[offset] = uint8(v) 1507 return base 1508 } 1509 func (m *NewRoundStep) Size() (n int) { 1510 if m == nil { 1511 return 0 1512 } 1513 var l int 1514 _ = l 1515 if m.Height != 0 { 1516 n += 1 + sovTypes(uint64(m.Height)) 1517 } 1518 if m.Round != 0 { 1519 n += 1 + sovTypes(uint64(m.Round)) 1520 } 1521 if m.Step != 0 { 1522 n += 1 + sovTypes(uint64(m.Step)) 1523 } 1524 if m.SecondsSinceStartTime != 0 { 1525 n += 1 + sovTypes(uint64(m.SecondsSinceStartTime)) 1526 } 1527 if m.LastCommitRound != 0 { 1528 n += 1 + sovTypes(uint64(m.LastCommitRound)) 1529 } 1530 return n 1531 } 1532 1533 func (m *NewValidBlock) Size() (n int) { 1534 if m == nil { 1535 return 0 1536 } 1537 var l int 1538 _ = l 1539 if m.Height != 0 { 1540 n += 1 + sovTypes(uint64(m.Height)) 1541 } 1542 if m.Round != 0 { 1543 n += 1 + sovTypes(uint64(m.Round)) 1544 } 1545 l = m.BlockPartSetHeader.Size() 1546 n += 1 + l + sovTypes(uint64(l)) 1547 if m.BlockParts != nil { 1548 l = m.BlockParts.Size() 1549 n += 1 + l + sovTypes(uint64(l)) 1550 } 1551 if m.IsCommit { 1552 n += 2 1553 } 1554 return n 1555 } 1556 1557 func (m *Proposal) Size() (n int) { 1558 if m == nil { 1559 return 0 1560 } 1561 var l int 1562 _ = l 1563 l = m.Proposal.Size() 1564 n += 1 + l + sovTypes(uint64(l)) 1565 return n 1566 } 1567 1568 func (m *ProposalPOL) Size() (n int) { 1569 if m == nil { 1570 return 0 1571 } 1572 var l int 1573 _ = l 1574 if m.Height != 0 { 1575 n += 1 + sovTypes(uint64(m.Height)) 1576 } 1577 if m.ProposalPolRound != 0 { 1578 n += 1 + sovTypes(uint64(m.ProposalPolRound)) 1579 } 1580 l = m.ProposalPol.Size() 1581 n += 1 + l + sovTypes(uint64(l)) 1582 return n 1583 } 1584 1585 func (m *BlockPart) Size() (n int) { 1586 if m == nil { 1587 return 0 1588 } 1589 var l int 1590 _ = l 1591 if m.Height != 0 { 1592 n += 1 + sovTypes(uint64(m.Height)) 1593 } 1594 if m.Round != 0 { 1595 n += 1 + sovTypes(uint64(m.Round)) 1596 } 1597 l = m.Part.Size() 1598 n += 1 + l + sovTypes(uint64(l)) 1599 return n 1600 } 1601 1602 func (m *Vote) Size() (n int) { 1603 if m == nil { 1604 return 0 1605 } 1606 var l int 1607 _ = l 1608 if m.Vote != nil { 1609 l = m.Vote.Size() 1610 n += 1 + l + sovTypes(uint64(l)) 1611 } 1612 return n 1613 } 1614 1615 func (m *HasVote) Size() (n int) { 1616 if m == nil { 1617 return 0 1618 } 1619 var l int 1620 _ = l 1621 if m.Height != 0 { 1622 n += 1 + sovTypes(uint64(m.Height)) 1623 } 1624 if m.Round != 0 { 1625 n += 1 + sovTypes(uint64(m.Round)) 1626 } 1627 if m.Type != 0 { 1628 n += 1 + sovTypes(uint64(m.Type)) 1629 } 1630 if m.Index != 0 { 1631 n += 1 + sovTypes(uint64(m.Index)) 1632 } 1633 return n 1634 } 1635 1636 func (m *VoteSetMaj23) Size() (n int) { 1637 if m == nil { 1638 return 0 1639 } 1640 var l int 1641 _ = l 1642 if m.Height != 0 { 1643 n += 1 + sovTypes(uint64(m.Height)) 1644 } 1645 if m.Round != 0 { 1646 n += 1 + sovTypes(uint64(m.Round)) 1647 } 1648 if m.Type != 0 { 1649 n += 1 + sovTypes(uint64(m.Type)) 1650 } 1651 l = m.BlockID.Size() 1652 n += 1 + l + sovTypes(uint64(l)) 1653 return n 1654 } 1655 1656 func (m *VoteSetBits) Size() (n int) { 1657 if m == nil { 1658 return 0 1659 } 1660 var l int 1661 _ = l 1662 if m.Height != 0 { 1663 n += 1 + sovTypes(uint64(m.Height)) 1664 } 1665 if m.Round != 0 { 1666 n += 1 + sovTypes(uint64(m.Round)) 1667 } 1668 if m.Type != 0 { 1669 n += 1 + sovTypes(uint64(m.Type)) 1670 } 1671 l = m.BlockID.Size() 1672 n += 1 + l + sovTypes(uint64(l)) 1673 l = m.Votes.Size() 1674 n += 1 + l + sovTypes(uint64(l)) 1675 return n 1676 } 1677 1678 func (m *Message) Size() (n int) { 1679 if m == nil { 1680 return 0 1681 } 1682 var l int 1683 _ = l 1684 if m.Sum != nil { 1685 n += m.Sum.Size() 1686 } 1687 return n 1688 } 1689 1690 func (m *Message_NewRoundStep) Size() (n int) { 1691 if m == nil { 1692 return 0 1693 } 1694 var l int 1695 _ = l 1696 if m.NewRoundStep != nil { 1697 l = m.NewRoundStep.Size() 1698 n += 1 + l + sovTypes(uint64(l)) 1699 } 1700 return n 1701 } 1702 func (m *Message_NewValidBlock) Size() (n int) { 1703 if m == nil { 1704 return 0 1705 } 1706 var l int 1707 _ = l 1708 if m.NewValidBlock != nil { 1709 l = m.NewValidBlock.Size() 1710 n += 1 + l + sovTypes(uint64(l)) 1711 } 1712 return n 1713 } 1714 func (m *Message_Proposal) Size() (n int) { 1715 if m == nil { 1716 return 0 1717 } 1718 var l int 1719 _ = l 1720 if m.Proposal != nil { 1721 l = m.Proposal.Size() 1722 n += 1 + l + sovTypes(uint64(l)) 1723 } 1724 return n 1725 } 1726 func (m *Message_ProposalPol) Size() (n int) { 1727 if m == nil { 1728 return 0 1729 } 1730 var l int 1731 _ = l 1732 if m.ProposalPol != nil { 1733 l = m.ProposalPol.Size() 1734 n += 1 + l + sovTypes(uint64(l)) 1735 } 1736 return n 1737 } 1738 func (m *Message_BlockPart) Size() (n int) { 1739 if m == nil { 1740 return 0 1741 } 1742 var l int 1743 _ = l 1744 if m.BlockPart != nil { 1745 l = m.BlockPart.Size() 1746 n += 1 + l + sovTypes(uint64(l)) 1747 } 1748 return n 1749 } 1750 func (m *Message_Vote) Size() (n int) { 1751 if m == nil { 1752 return 0 1753 } 1754 var l int 1755 _ = l 1756 if m.Vote != nil { 1757 l = m.Vote.Size() 1758 n += 1 + l + sovTypes(uint64(l)) 1759 } 1760 return n 1761 } 1762 func (m *Message_HasVote) Size() (n int) { 1763 if m == nil { 1764 return 0 1765 } 1766 var l int 1767 _ = l 1768 if m.HasVote != nil { 1769 l = m.HasVote.Size() 1770 n += 1 + l + sovTypes(uint64(l)) 1771 } 1772 return n 1773 } 1774 func (m *Message_VoteSetMaj23) Size() (n int) { 1775 if m == nil { 1776 return 0 1777 } 1778 var l int 1779 _ = l 1780 if m.VoteSetMaj23 != nil { 1781 l = m.VoteSetMaj23.Size() 1782 n += 1 + l + sovTypes(uint64(l)) 1783 } 1784 return n 1785 } 1786 func (m *Message_VoteSetBits) Size() (n int) { 1787 if m == nil { 1788 return 0 1789 } 1790 var l int 1791 _ = l 1792 if m.VoteSetBits != nil { 1793 l = m.VoteSetBits.Size() 1794 n += 1 + l + sovTypes(uint64(l)) 1795 } 1796 return n 1797 } 1798 1799 func sovTypes(x uint64) (n int) { 1800 return (math_bits.Len64(x|1) + 6) / 7 1801 } 1802 func sozTypes(x uint64) (n int) { 1803 return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 1804 } 1805 func (m *NewRoundStep) Unmarshal(dAtA []byte) error { 1806 l := len(dAtA) 1807 iNdEx := 0 1808 for iNdEx < l { 1809 preIndex := iNdEx 1810 var wire uint64 1811 for shift := uint(0); ; shift += 7 { 1812 if shift >= 64 { 1813 return ErrIntOverflowTypes 1814 } 1815 if iNdEx >= l { 1816 return io.ErrUnexpectedEOF 1817 } 1818 b := dAtA[iNdEx] 1819 iNdEx++ 1820 wire |= uint64(b&0x7F) << shift 1821 if b < 0x80 { 1822 break 1823 } 1824 } 1825 fieldNum := int32(wire >> 3) 1826 wireType := int(wire & 0x7) 1827 if wireType == 4 { 1828 return fmt.Errorf("proto: NewRoundStep: wiretype end group for non-group") 1829 } 1830 if fieldNum <= 0 { 1831 return fmt.Errorf("proto: NewRoundStep: illegal tag %d (wire type %d)", fieldNum, wire) 1832 } 1833 switch fieldNum { 1834 case 1: 1835 if wireType != 0 { 1836 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 1837 } 1838 m.Height = 0 1839 for shift := uint(0); ; shift += 7 { 1840 if shift >= 64 { 1841 return ErrIntOverflowTypes 1842 } 1843 if iNdEx >= l { 1844 return io.ErrUnexpectedEOF 1845 } 1846 b := dAtA[iNdEx] 1847 iNdEx++ 1848 m.Height |= int64(b&0x7F) << shift 1849 if b < 0x80 { 1850 break 1851 } 1852 } 1853 case 2: 1854 if wireType != 0 { 1855 return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) 1856 } 1857 m.Round = 0 1858 for shift := uint(0); ; shift += 7 { 1859 if shift >= 64 { 1860 return ErrIntOverflowTypes 1861 } 1862 if iNdEx >= l { 1863 return io.ErrUnexpectedEOF 1864 } 1865 b := dAtA[iNdEx] 1866 iNdEx++ 1867 m.Round |= int32(b&0x7F) << shift 1868 if b < 0x80 { 1869 break 1870 } 1871 } 1872 case 3: 1873 if wireType != 0 { 1874 return fmt.Errorf("proto: wrong wireType = %d for field Step", wireType) 1875 } 1876 m.Step = 0 1877 for shift := uint(0); ; shift += 7 { 1878 if shift >= 64 { 1879 return ErrIntOverflowTypes 1880 } 1881 if iNdEx >= l { 1882 return io.ErrUnexpectedEOF 1883 } 1884 b := dAtA[iNdEx] 1885 iNdEx++ 1886 m.Step |= uint32(b&0x7F) << shift 1887 if b < 0x80 { 1888 break 1889 } 1890 } 1891 case 4: 1892 if wireType != 0 { 1893 return fmt.Errorf("proto: wrong wireType = %d for field SecondsSinceStartTime", wireType) 1894 } 1895 m.SecondsSinceStartTime = 0 1896 for shift := uint(0); ; shift += 7 { 1897 if shift >= 64 { 1898 return ErrIntOverflowTypes 1899 } 1900 if iNdEx >= l { 1901 return io.ErrUnexpectedEOF 1902 } 1903 b := dAtA[iNdEx] 1904 iNdEx++ 1905 m.SecondsSinceStartTime |= int64(b&0x7F) << shift 1906 if b < 0x80 { 1907 break 1908 } 1909 } 1910 case 5: 1911 if wireType != 0 { 1912 return fmt.Errorf("proto: wrong wireType = %d for field LastCommitRound", wireType) 1913 } 1914 m.LastCommitRound = 0 1915 for shift := uint(0); ; shift += 7 { 1916 if shift >= 64 { 1917 return ErrIntOverflowTypes 1918 } 1919 if iNdEx >= l { 1920 return io.ErrUnexpectedEOF 1921 } 1922 b := dAtA[iNdEx] 1923 iNdEx++ 1924 m.LastCommitRound |= int32(b&0x7F) << shift 1925 if b < 0x80 { 1926 break 1927 } 1928 } 1929 default: 1930 iNdEx = preIndex 1931 skippy, err := skipTypes(dAtA[iNdEx:]) 1932 if err != nil { 1933 return err 1934 } 1935 if (skippy < 0) || (iNdEx+skippy) < 0 { 1936 return ErrInvalidLengthTypes 1937 } 1938 if (iNdEx + skippy) > l { 1939 return io.ErrUnexpectedEOF 1940 } 1941 iNdEx += skippy 1942 } 1943 } 1944 1945 if iNdEx > l { 1946 return io.ErrUnexpectedEOF 1947 } 1948 return nil 1949 } 1950 func (m *NewValidBlock) Unmarshal(dAtA []byte) error { 1951 l := len(dAtA) 1952 iNdEx := 0 1953 for iNdEx < l { 1954 preIndex := iNdEx 1955 var wire uint64 1956 for shift := uint(0); ; shift += 7 { 1957 if shift >= 64 { 1958 return ErrIntOverflowTypes 1959 } 1960 if iNdEx >= l { 1961 return io.ErrUnexpectedEOF 1962 } 1963 b := dAtA[iNdEx] 1964 iNdEx++ 1965 wire |= uint64(b&0x7F) << shift 1966 if b < 0x80 { 1967 break 1968 } 1969 } 1970 fieldNum := int32(wire >> 3) 1971 wireType := int(wire & 0x7) 1972 if wireType == 4 { 1973 return fmt.Errorf("proto: NewValidBlock: wiretype end group for non-group") 1974 } 1975 if fieldNum <= 0 { 1976 return fmt.Errorf("proto: NewValidBlock: illegal tag %d (wire type %d)", fieldNum, wire) 1977 } 1978 switch fieldNum { 1979 case 1: 1980 if wireType != 0 { 1981 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 1982 } 1983 m.Height = 0 1984 for shift := uint(0); ; shift += 7 { 1985 if shift >= 64 { 1986 return ErrIntOverflowTypes 1987 } 1988 if iNdEx >= l { 1989 return io.ErrUnexpectedEOF 1990 } 1991 b := dAtA[iNdEx] 1992 iNdEx++ 1993 m.Height |= int64(b&0x7F) << shift 1994 if b < 0x80 { 1995 break 1996 } 1997 } 1998 case 2: 1999 if wireType != 0 { 2000 return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) 2001 } 2002 m.Round = 0 2003 for shift := uint(0); ; shift += 7 { 2004 if shift >= 64 { 2005 return ErrIntOverflowTypes 2006 } 2007 if iNdEx >= l { 2008 return io.ErrUnexpectedEOF 2009 } 2010 b := dAtA[iNdEx] 2011 iNdEx++ 2012 m.Round |= int32(b&0x7F) << shift 2013 if b < 0x80 { 2014 break 2015 } 2016 } 2017 case 3: 2018 if wireType != 2 { 2019 return fmt.Errorf("proto: wrong wireType = %d for field BlockPartSetHeader", wireType) 2020 } 2021 var msglen int 2022 for shift := uint(0); ; shift += 7 { 2023 if shift >= 64 { 2024 return ErrIntOverflowTypes 2025 } 2026 if iNdEx >= l { 2027 return io.ErrUnexpectedEOF 2028 } 2029 b := dAtA[iNdEx] 2030 iNdEx++ 2031 msglen |= int(b&0x7F) << shift 2032 if b < 0x80 { 2033 break 2034 } 2035 } 2036 if msglen < 0 { 2037 return ErrInvalidLengthTypes 2038 } 2039 postIndex := iNdEx + msglen 2040 if postIndex < 0 { 2041 return ErrInvalidLengthTypes 2042 } 2043 if postIndex > l { 2044 return io.ErrUnexpectedEOF 2045 } 2046 if err := m.BlockPartSetHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2047 return err 2048 } 2049 iNdEx = postIndex 2050 case 4: 2051 if wireType != 2 { 2052 return fmt.Errorf("proto: wrong wireType = %d for field BlockParts", wireType) 2053 } 2054 var msglen int 2055 for shift := uint(0); ; shift += 7 { 2056 if shift >= 64 { 2057 return ErrIntOverflowTypes 2058 } 2059 if iNdEx >= l { 2060 return io.ErrUnexpectedEOF 2061 } 2062 b := dAtA[iNdEx] 2063 iNdEx++ 2064 msglen |= int(b&0x7F) << shift 2065 if b < 0x80 { 2066 break 2067 } 2068 } 2069 if msglen < 0 { 2070 return ErrInvalidLengthTypes 2071 } 2072 postIndex := iNdEx + msglen 2073 if postIndex < 0 { 2074 return ErrInvalidLengthTypes 2075 } 2076 if postIndex > l { 2077 return io.ErrUnexpectedEOF 2078 } 2079 if m.BlockParts == nil { 2080 m.BlockParts = &bits.BitArray{} 2081 } 2082 if err := m.BlockParts.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2083 return err 2084 } 2085 iNdEx = postIndex 2086 case 5: 2087 if wireType != 0 { 2088 return fmt.Errorf("proto: wrong wireType = %d for field IsCommit", wireType) 2089 } 2090 var v int 2091 for shift := uint(0); ; shift += 7 { 2092 if shift >= 64 { 2093 return ErrIntOverflowTypes 2094 } 2095 if iNdEx >= l { 2096 return io.ErrUnexpectedEOF 2097 } 2098 b := dAtA[iNdEx] 2099 iNdEx++ 2100 v |= int(b&0x7F) << shift 2101 if b < 0x80 { 2102 break 2103 } 2104 } 2105 m.IsCommit = bool(v != 0) 2106 default: 2107 iNdEx = preIndex 2108 skippy, err := skipTypes(dAtA[iNdEx:]) 2109 if err != nil { 2110 return err 2111 } 2112 if (skippy < 0) || (iNdEx+skippy) < 0 { 2113 return ErrInvalidLengthTypes 2114 } 2115 if (iNdEx + skippy) > l { 2116 return io.ErrUnexpectedEOF 2117 } 2118 iNdEx += skippy 2119 } 2120 } 2121 2122 if iNdEx > l { 2123 return io.ErrUnexpectedEOF 2124 } 2125 return nil 2126 } 2127 func (m *Proposal) Unmarshal(dAtA []byte) error { 2128 l := len(dAtA) 2129 iNdEx := 0 2130 for iNdEx < l { 2131 preIndex := iNdEx 2132 var wire uint64 2133 for shift := uint(0); ; shift += 7 { 2134 if shift >= 64 { 2135 return ErrIntOverflowTypes 2136 } 2137 if iNdEx >= l { 2138 return io.ErrUnexpectedEOF 2139 } 2140 b := dAtA[iNdEx] 2141 iNdEx++ 2142 wire |= uint64(b&0x7F) << shift 2143 if b < 0x80 { 2144 break 2145 } 2146 } 2147 fieldNum := int32(wire >> 3) 2148 wireType := int(wire & 0x7) 2149 if wireType == 4 { 2150 return fmt.Errorf("proto: Proposal: wiretype end group for non-group") 2151 } 2152 if fieldNum <= 0 { 2153 return fmt.Errorf("proto: Proposal: illegal tag %d (wire type %d)", fieldNum, wire) 2154 } 2155 switch fieldNum { 2156 case 1: 2157 if wireType != 2 { 2158 return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) 2159 } 2160 var msglen int 2161 for shift := uint(0); ; shift += 7 { 2162 if shift >= 64 { 2163 return ErrIntOverflowTypes 2164 } 2165 if iNdEx >= l { 2166 return io.ErrUnexpectedEOF 2167 } 2168 b := dAtA[iNdEx] 2169 iNdEx++ 2170 msglen |= int(b&0x7F) << shift 2171 if b < 0x80 { 2172 break 2173 } 2174 } 2175 if msglen < 0 { 2176 return ErrInvalidLengthTypes 2177 } 2178 postIndex := iNdEx + msglen 2179 if postIndex < 0 { 2180 return ErrInvalidLengthTypes 2181 } 2182 if postIndex > l { 2183 return io.ErrUnexpectedEOF 2184 } 2185 if err := m.Proposal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2186 return err 2187 } 2188 iNdEx = postIndex 2189 default: 2190 iNdEx = preIndex 2191 skippy, err := skipTypes(dAtA[iNdEx:]) 2192 if err != nil { 2193 return err 2194 } 2195 if (skippy < 0) || (iNdEx+skippy) < 0 { 2196 return ErrInvalidLengthTypes 2197 } 2198 if (iNdEx + skippy) > l { 2199 return io.ErrUnexpectedEOF 2200 } 2201 iNdEx += skippy 2202 } 2203 } 2204 2205 if iNdEx > l { 2206 return io.ErrUnexpectedEOF 2207 } 2208 return nil 2209 } 2210 func (m *ProposalPOL) Unmarshal(dAtA []byte) error { 2211 l := len(dAtA) 2212 iNdEx := 0 2213 for iNdEx < l { 2214 preIndex := iNdEx 2215 var wire uint64 2216 for shift := uint(0); ; shift += 7 { 2217 if shift >= 64 { 2218 return ErrIntOverflowTypes 2219 } 2220 if iNdEx >= l { 2221 return io.ErrUnexpectedEOF 2222 } 2223 b := dAtA[iNdEx] 2224 iNdEx++ 2225 wire |= uint64(b&0x7F) << shift 2226 if b < 0x80 { 2227 break 2228 } 2229 } 2230 fieldNum := int32(wire >> 3) 2231 wireType := int(wire & 0x7) 2232 if wireType == 4 { 2233 return fmt.Errorf("proto: ProposalPOL: wiretype end group for non-group") 2234 } 2235 if fieldNum <= 0 { 2236 return fmt.Errorf("proto: ProposalPOL: illegal tag %d (wire type %d)", fieldNum, wire) 2237 } 2238 switch fieldNum { 2239 case 1: 2240 if wireType != 0 { 2241 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 2242 } 2243 m.Height = 0 2244 for shift := uint(0); ; shift += 7 { 2245 if shift >= 64 { 2246 return ErrIntOverflowTypes 2247 } 2248 if iNdEx >= l { 2249 return io.ErrUnexpectedEOF 2250 } 2251 b := dAtA[iNdEx] 2252 iNdEx++ 2253 m.Height |= int64(b&0x7F) << shift 2254 if b < 0x80 { 2255 break 2256 } 2257 } 2258 case 2: 2259 if wireType != 0 { 2260 return fmt.Errorf("proto: wrong wireType = %d for field ProposalPolRound", wireType) 2261 } 2262 m.ProposalPolRound = 0 2263 for shift := uint(0); ; shift += 7 { 2264 if shift >= 64 { 2265 return ErrIntOverflowTypes 2266 } 2267 if iNdEx >= l { 2268 return io.ErrUnexpectedEOF 2269 } 2270 b := dAtA[iNdEx] 2271 iNdEx++ 2272 m.ProposalPolRound |= int32(b&0x7F) << shift 2273 if b < 0x80 { 2274 break 2275 } 2276 } 2277 case 3: 2278 if wireType != 2 { 2279 return fmt.Errorf("proto: wrong wireType = %d for field ProposalPol", wireType) 2280 } 2281 var msglen int 2282 for shift := uint(0); ; shift += 7 { 2283 if shift >= 64 { 2284 return ErrIntOverflowTypes 2285 } 2286 if iNdEx >= l { 2287 return io.ErrUnexpectedEOF 2288 } 2289 b := dAtA[iNdEx] 2290 iNdEx++ 2291 msglen |= int(b&0x7F) << shift 2292 if b < 0x80 { 2293 break 2294 } 2295 } 2296 if msglen < 0 { 2297 return ErrInvalidLengthTypes 2298 } 2299 postIndex := iNdEx + msglen 2300 if postIndex < 0 { 2301 return ErrInvalidLengthTypes 2302 } 2303 if postIndex > l { 2304 return io.ErrUnexpectedEOF 2305 } 2306 if err := m.ProposalPol.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2307 return err 2308 } 2309 iNdEx = postIndex 2310 default: 2311 iNdEx = preIndex 2312 skippy, err := skipTypes(dAtA[iNdEx:]) 2313 if err != nil { 2314 return err 2315 } 2316 if (skippy < 0) || (iNdEx+skippy) < 0 { 2317 return ErrInvalidLengthTypes 2318 } 2319 if (iNdEx + skippy) > l { 2320 return io.ErrUnexpectedEOF 2321 } 2322 iNdEx += skippy 2323 } 2324 } 2325 2326 if iNdEx > l { 2327 return io.ErrUnexpectedEOF 2328 } 2329 return nil 2330 } 2331 func (m *BlockPart) Unmarshal(dAtA []byte) error { 2332 l := len(dAtA) 2333 iNdEx := 0 2334 for iNdEx < l { 2335 preIndex := iNdEx 2336 var wire uint64 2337 for shift := uint(0); ; shift += 7 { 2338 if shift >= 64 { 2339 return ErrIntOverflowTypes 2340 } 2341 if iNdEx >= l { 2342 return io.ErrUnexpectedEOF 2343 } 2344 b := dAtA[iNdEx] 2345 iNdEx++ 2346 wire |= uint64(b&0x7F) << shift 2347 if b < 0x80 { 2348 break 2349 } 2350 } 2351 fieldNum := int32(wire >> 3) 2352 wireType := int(wire & 0x7) 2353 if wireType == 4 { 2354 return fmt.Errorf("proto: BlockPart: wiretype end group for non-group") 2355 } 2356 if fieldNum <= 0 { 2357 return fmt.Errorf("proto: BlockPart: illegal tag %d (wire type %d)", fieldNum, wire) 2358 } 2359 switch fieldNum { 2360 case 1: 2361 if wireType != 0 { 2362 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 2363 } 2364 m.Height = 0 2365 for shift := uint(0); ; shift += 7 { 2366 if shift >= 64 { 2367 return ErrIntOverflowTypes 2368 } 2369 if iNdEx >= l { 2370 return io.ErrUnexpectedEOF 2371 } 2372 b := dAtA[iNdEx] 2373 iNdEx++ 2374 m.Height |= int64(b&0x7F) << shift 2375 if b < 0x80 { 2376 break 2377 } 2378 } 2379 case 2: 2380 if wireType != 0 { 2381 return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) 2382 } 2383 m.Round = 0 2384 for shift := uint(0); ; shift += 7 { 2385 if shift >= 64 { 2386 return ErrIntOverflowTypes 2387 } 2388 if iNdEx >= l { 2389 return io.ErrUnexpectedEOF 2390 } 2391 b := dAtA[iNdEx] 2392 iNdEx++ 2393 m.Round |= int32(b&0x7F) << shift 2394 if b < 0x80 { 2395 break 2396 } 2397 } 2398 case 3: 2399 if wireType != 2 { 2400 return fmt.Errorf("proto: wrong wireType = %d for field Part", wireType) 2401 } 2402 var msglen int 2403 for shift := uint(0); ; shift += 7 { 2404 if shift >= 64 { 2405 return ErrIntOverflowTypes 2406 } 2407 if iNdEx >= l { 2408 return io.ErrUnexpectedEOF 2409 } 2410 b := dAtA[iNdEx] 2411 iNdEx++ 2412 msglen |= int(b&0x7F) << shift 2413 if b < 0x80 { 2414 break 2415 } 2416 } 2417 if msglen < 0 { 2418 return ErrInvalidLengthTypes 2419 } 2420 postIndex := iNdEx + msglen 2421 if postIndex < 0 { 2422 return ErrInvalidLengthTypes 2423 } 2424 if postIndex > l { 2425 return io.ErrUnexpectedEOF 2426 } 2427 if err := m.Part.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2428 return err 2429 } 2430 iNdEx = postIndex 2431 default: 2432 iNdEx = preIndex 2433 skippy, err := skipTypes(dAtA[iNdEx:]) 2434 if err != nil { 2435 return err 2436 } 2437 if (skippy < 0) || (iNdEx+skippy) < 0 { 2438 return ErrInvalidLengthTypes 2439 } 2440 if (iNdEx + skippy) > l { 2441 return io.ErrUnexpectedEOF 2442 } 2443 iNdEx += skippy 2444 } 2445 } 2446 2447 if iNdEx > l { 2448 return io.ErrUnexpectedEOF 2449 } 2450 return nil 2451 } 2452 func (m *Vote) Unmarshal(dAtA []byte) error { 2453 l := len(dAtA) 2454 iNdEx := 0 2455 for iNdEx < l { 2456 preIndex := iNdEx 2457 var wire uint64 2458 for shift := uint(0); ; shift += 7 { 2459 if shift >= 64 { 2460 return ErrIntOverflowTypes 2461 } 2462 if iNdEx >= l { 2463 return io.ErrUnexpectedEOF 2464 } 2465 b := dAtA[iNdEx] 2466 iNdEx++ 2467 wire |= uint64(b&0x7F) << shift 2468 if b < 0x80 { 2469 break 2470 } 2471 } 2472 fieldNum := int32(wire >> 3) 2473 wireType := int(wire & 0x7) 2474 if wireType == 4 { 2475 return fmt.Errorf("proto: Vote: wiretype end group for non-group") 2476 } 2477 if fieldNum <= 0 { 2478 return fmt.Errorf("proto: Vote: illegal tag %d (wire type %d)", fieldNum, wire) 2479 } 2480 switch fieldNum { 2481 case 1: 2482 if wireType != 2 { 2483 return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) 2484 } 2485 var msglen int 2486 for shift := uint(0); ; shift += 7 { 2487 if shift >= 64 { 2488 return ErrIntOverflowTypes 2489 } 2490 if iNdEx >= l { 2491 return io.ErrUnexpectedEOF 2492 } 2493 b := dAtA[iNdEx] 2494 iNdEx++ 2495 msglen |= int(b&0x7F) << shift 2496 if b < 0x80 { 2497 break 2498 } 2499 } 2500 if msglen < 0 { 2501 return ErrInvalidLengthTypes 2502 } 2503 postIndex := iNdEx + msglen 2504 if postIndex < 0 { 2505 return ErrInvalidLengthTypes 2506 } 2507 if postIndex > l { 2508 return io.ErrUnexpectedEOF 2509 } 2510 if m.Vote == nil { 2511 m.Vote = &types.Vote{} 2512 } 2513 if err := m.Vote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2514 return err 2515 } 2516 iNdEx = postIndex 2517 default: 2518 iNdEx = preIndex 2519 skippy, err := skipTypes(dAtA[iNdEx:]) 2520 if err != nil { 2521 return err 2522 } 2523 if (skippy < 0) || (iNdEx+skippy) < 0 { 2524 return ErrInvalidLengthTypes 2525 } 2526 if (iNdEx + skippy) > l { 2527 return io.ErrUnexpectedEOF 2528 } 2529 iNdEx += skippy 2530 } 2531 } 2532 2533 if iNdEx > l { 2534 return io.ErrUnexpectedEOF 2535 } 2536 return nil 2537 } 2538 func (m *HasVote) Unmarshal(dAtA []byte) error { 2539 l := len(dAtA) 2540 iNdEx := 0 2541 for iNdEx < l { 2542 preIndex := iNdEx 2543 var wire uint64 2544 for shift := uint(0); ; shift += 7 { 2545 if shift >= 64 { 2546 return ErrIntOverflowTypes 2547 } 2548 if iNdEx >= l { 2549 return io.ErrUnexpectedEOF 2550 } 2551 b := dAtA[iNdEx] 2552 iNdEx++ 2553 wire |= uint64(b&0x7F) << shift 2554 if b < 0x80 { 2555 break 2556 } 2557 } 2558 fieldNum := int32(wire >> 3) 2559 wireType := int(wire & 0x7) 2560 if wireType == 4 { 2561 return fmt.Errorf("proto: HasVote: wiretype end group for non-group") 2562 } 2563 if fieldNum <= 0 { 2564 return fmt.Errorf("proto: HasVote: illegal tag %d (wire type %d)", fieldNum, wire) 2565 } 2566 switch fieldNum { 2567 case 1: 2568 if wireType != 0 { 2569 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 2570 } 2571 m.Height = 0 2572 for shift := uint(0); ; shift += 7 { 2573 if shift >= 64 { 2574 return ErrIntOverflowTypes 2575 } 2576 if iNdEx >= l { 2577 return io.ErrUnexpectedEOF 2578 } 2579 b := dAtA[iNdEx] 2580 iNdEx++ 2581 m.Height |= int64(b&0x7F) << shift 2582 if b < 0x80 { 2583 break 2584 } 2585 } 2586 case 2: 2587 if wireType != 0 { 2588 return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) 2589 } 2590 m.Round = 0 2591 for shift := uint(0); ; shift += 7 { 2592 if shift >= 64 { 2593 return ErrIntOverflowTypes 2594 } 2595 if iNdEx >= l { 2596 return io.ErrUnexpectedEOF 2597 } 2598 b := dAtA[iNdEx] 2599 iNdEx++ 2600 m.Round |= int32(b&0x7F) << shift 2601 if b < 0x80 { 2602 break 2603 } 2604 } 2605 case 3: 2606 if wireType != 0 { 2607 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 2608 } 2609 m.Type = 0 2610 for shift := uint(0); ; shift += 7 { 2611 if shift >= 64 { 2612 return ErrIntOverflowTypes 2613 } 2614 if iNdEx >= l { 2615 return io.ErrUnexpectedEOF 2616 } 2617 b := dAtA[iNdEx] 2618 iNdEx++ 2619 m.Type |= types.SignedMsgType(b&0x7F) << shift 2620 if b < 0x80 { 2621 break 2622 } 2623 } 2624 case 4: 2625 if wireType != 0 { 2626 return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) 2627 } 2628 m.Index = 0 2629 for shift := uint(0); ; shift += 7 { 2630 if shift >= 64 { 2631 return ErrIntOverflowTypes 2632 } 2633 if iNdEx >= l { 2634 return io.ErrUnexpectedEOF 2635 } 2636 b := dAtA[iNdEx] 2637 iNdEx++ 2638 m.Index |= int32(b&0x7F) << shift 2639 if b < 0x80 { 2640 break 2641 } 2642 } 2643 default: 2644 iNdEx = preIndex 2645 skippy, err := skipTypes(dAtA[iNdEx:]) 2646 if err != nil { 2647 return err 2648 } 2649 if (skippy < 0) || (iNdEx+skippy) < 0 { 2650 return ErrInvalidLengthTypes 2651 } 2652 if (iNdEx + skippy) > l { 2653 return io.ErrUnexpectedEOF 2654 } 2655 iNdEx += skippy 2656 } 2657 } 2658 2659 if iNdEx > l { 2660 return io.ErrUnexpectedEOF 2661 } 2662 return nil 2663 } 2664 func (m *VoteSetMaj23) Unmarshal(dAtA []byte) error { 2665 l := len(dAtA) 2666 iNdEx := 0 2667 for iNdEx < l { 2668 preIndex := iNdEx 2669 var wire uint64 2670 for shift := uint(0); ; shift += 7 { 2671 if shift >= 64 { 2672 return ErrIntOverflowTypes 2673 } 2674 if iNdEx >= l { 2675 return io.ErrUnexpectedEOF 2676 } 2677 b := dAtA[iNdEx] 2678 iNdEx++ 2679 wire |= uint64(b&0x7F) << shift 2680 if b < 0x80 { 2681 break 2682 } 2683 } 2684 fieldNum := int32(wire >> 3) 2685 wireType := int(wire & 0x7) 2686 if wireType == 4 { 2687 return fmt.Errorf("proto: VoteSetMaj23: wiretype end group for non-group") 2688 } 2689 if fieldNum <= 0 { 2690 return fmt.Errorf("proto: VoteSetMaj23: illegal tag %d (wire type %d)", fieldNum, wire) 2691 } 2692 switch fieldNum { 2693 case 1: 2694 if wireType != 0 { 2695 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 2696 } 2697 m.Height = 0 2698 for shift := uint(0); ; shift += 7 { 2699 if shift >= 64 { 2700 return ErrIntOverflowTypes 2701 } 2702 if iNdEx >= l { 2703 return io.ErrUnexpectedEOF 2704 } 2705 b := dAtA[iNdEx] 2706 iNdEx++ 2707 m.Height |= int64(b&0x7F) << shift 2708 if b < 0x80 { 2709 break 2710 } 2711 } 2712 case 2: 2713 if wireType != 0 { 2714 return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) 2715 } 2716 m.Round = 0 2717 for shift := uint(0); ; shift += 7 { 2718 if shift >= 64 { 2719 return ErrIntOverflowTypes 2720 } 2721 if iNdEx >= l { 2722 return io.ErrUnexpectedEOF 2723 } 2724 b := dAtA[iNdEx] 2725 iNdEx++ 2726 m.Round |= int32(b&0x7F) << shift 2727 if b < 0x80 { 2728 break 2729 } 2730 } 2731 case 3: 2732 if wireType != 0 { 2733 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 2734 } 2735 m.Type = 0 2736 for shift := uint(0); ; shift += 7 { 2737 if shift >= 64 { 2738 return ErrIntOverflowTypes 2739 } 2740 if iNdEx >= l { 2741 return io.ErrUnexpectedEOF 2742 } 2743 b := dAtA[iNdEx] 2744 iNdEx++ 2745 m.Type |= types.SignedMsgType(b&0x7F) << shift 2746 if b < 0x80 { 2747 break 2748 } 2749 } 2750 case 4: 2751 if wireType != 2 { 2752 return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) 2753 } 2754 var msglen int 2755 for shift := uint(0); ; shift += 7 { 2756 if shift >= 64 { 2757 return ErrIntOverflowTypes 2758 } 2759 if iNdEx >= l { 2760 return io.ErrUnexpectedEOF 2761 } 2762 b := dAtA[iNdEx] 2763 iNdEx++ 2764 msglen |= int(b&0x7F) << shift 2765 if b < 0x80 { 2766 break 2767 } 2768 } 2769 if msglen < 0 { 2770 return ErrInvalidLengthTypes 2771 } 2772 postIndex := iNdEx + msglen 2773 if postIndex < 0 { 2774 return ErrInvalidLengthTypes 2775 } 2776 if postIndex > l { 2777 return io.ErrUnexpectedEOF 2778 } 2779 if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2780 return err 2781 } 2782 iNdEx = postIndex 2783 default: 2784 iNdEx = preIndex 2785 skippy, err := skipTypes(dAtA[iNdEx:]) 2786 if err != nil { 2787 return err 2788 } 2789 if (skippy < 0) || (iNdEx+skippy) < 0 { 2790 return ErrInvalidLengthTypes 2791 } 2792 if (iNdEx + skippy) > l { 2793 return io.ErrUnexpectedEOF 2794 } 2795 iNdEx += skippy 2796 } 2797 } 2798 2799 if iNdEx > l { 2800 return io.ErrUnexpectedEOF 2801 } 2802 return nil 2803 } 2804 func (m *VoteSetBits) Unmarshal(dAtA []byte) error { 2805 l := len(dAtA) 2806 iNdEx := 0 2807 for iNdEx < l { 2808 preIndex := iNdEx 2809 var wire uint64 2810 for shift := uint(0); ; shift += 7 { 2811 if shift >= 64 { 2812 return ErrIntOverflowTypes 2813 } 2814 if iNdEx >= l { 2815 return io.ErrUnexpectedEOF 2816 } 2817 b := dAtA[iNdEx] 2818 iNdEx++ 2819 wire |= uint64(b&0x7F) << shift 2820 if b < 0x80 { 2821 break 2822 } 2823 } 2824 fieldNum := int32(wire >> 3) 2825 wireType := int(wire & 0x7) 2826 if wireType == 4 { 2827 return fmt.Errorf("proto: VoteSetBits: wiretype end group for non-group") 2828 } 2829 if fieldNum <= 0 { 2830 return fmt.Errorf("proto: VoteSetBits: illegal tag %d (wire type %d)", fieldNum, wire) 2831 } 2832 switch fieldNum { 2833 case 1: 2834 if wireType != 0 { 2835 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 2836 } 2837 m.Height = 0 2838 for shift := uint(0); ; shift += 7 { 2839 if shift >= 64 { 2840 return ErrIntOverflowTypes 2841 } 2842 if iNdEx >= l { 2843 return io.ErrUnexpectedEOF 2844 } 2845 b := dAtA[iNdEx] 2846 iNdEx++ 2847 m.Height |= int64(b&0x7F) << shift 2848 if b < 0x80 { 2849 break 2850 } 2851 } 2852 case 2: 2853 if wireType != 0 { 2854 return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) 2855 } 2856 m.Round = 0 2857 for shift := uint(0); ; shift += 7 { 2858 if shift >= 64 { 2859 return ErrIntOverflowTypes 2860 } 2861 if iNdEx >= l { 2862 return io.ErrUnexpectedEOF 2863 } 2864 b := dAtA[iNdEx] 2865 iNdEx++ 2866 m.Round |= int32(b&0x7F) << shift 2867 if b < 0x80 { 2868 break 2869 } 2870 } 2871 case 3: 2872 if wireType != 0 { 2873 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 2874 } 2875 m.Type = 0 2876 for shift := uint(0); ; shift += 7 { 2877 if shift >= 64 { 2878 return ErrIntOverflowTypes 2879 } 2880 if iNdEx >= l { 2881 return io.ErrUnexpectedEOF 2882 } 2883 b := dAtA[iNdEx] 2884 iNdEx++ 2885 m.Type |= types.SignedMsgType(b&0x7F) << shift 2886 if b < 0x80 { 2887 break 2888 } 2889 } 2890 case 4: 2891 if wireType != 2 { 2892 return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) 2893 } 2894 var msglen int 2895 for shift := uint(0); ; shift += 7 { 2896 if shift >= 64 { 2897 return ErrIntOverflowTypes 2898 } 2899 if iNdEx >= l { 2900 return io.ErrUnexpectedEOF 2901 } 2902 b := dAtA[iNdEx] 2903 iNdEx++ 2904 msglen |= int(b&0x7F) << shift 2905 if b < 0x80 { 2906 break 2907 } 2908 } 2909 if msglen < 0 { 2910 return ErrInvalidLengthTypes 2911 } 2912 postIndex := iNdEx + msglen 2913 if postIndex < 0 { 2914 return ErrInvalidLengthTypes 2915 } 2916 if postIndex > l { 2917 return io.ErrUnexpectedEOF 2918 } 2919 if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2920 return err 2921 } 2922 iNdEx = postIndex 2923 case 5: 2924 if wireType != 2 { 2925 return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType) 2926 } 2927 var msglen int 2928 for shift := uint(0); ; shift += 7 { 2929 if shift >= 64 { 2930 return ErrIntOverflowTypes 2931 } 2932 if iNdEx >= l { 2933 return io.ErrUnexpectedEOF 2934 } 2935 b := dAtA[iNdEx] 2936 iNdEx++ 2937 msglen |= int(b&0x7F) << shift 2938 if b < 0x80 { 2939 break 2940 } 2941 } 2942 if msglen < 0 { 2943 return ErrInvalidLengthTypes 2944 } 2945 postIndex := iNdEx + msglen 2946 if postIndex < 0 { 2947 return ErrInvalidLengthTypes 2948 } 2949 if postIndex > l { 2950 return io.ErrUnexpectedEOF 2951 } 2952 if err := m.Votes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2953 return err 2954 } 2955 iNdEx = postIndex 2956 default: 2957 iNdEx = preIndex 2958 skippy, err := skipTypes(dAtA[iNdEx:]) 2959 if err != nil { 2960 return err 2961 } 2962 if (skippy < 0) || (iNdEx+skippy) < 0 { 2963 return ErrInvalidLengthTypes 2964 } 2965 if (iNdEx + skippy) > l { 2966 return io.ErrUnexpectedEOF 2967 } 2968 iNdEx += skippy 2969 } 2970 } 2971 2972 if iNdEx > l { 2973 return io.ErrUnexpectedEOF 2974 } 2975 return nil 2976 } 2977 func (m *Message) Unmarshal(dAtA []byte) error { 2978 l := len(dAtA) 2979 iNdEx := 0 2980 for iNdEx < l { 2981 preIndex := iNdEx 2982 var wire uint64 2983 for shift := uint(0); ; shift += 7 { 2984 if shift >= 64 { 2985 return ErrIntOverflowTypes 2986 } 2987 if iNdEx >= l { 2988 return io.ErrUnexpectedEOF 2989 } 2990 b := dAtA[iNdEx] 2991 iNdEx++ 2992 wire |= uint64(b&0x7F) << shift 2993 if b < 0x80 { 2994 break 2995 } 2996 } 2997 fieldNum := int32(wire >> 3) 2998 wireType := int(wire & 0x7) 2999 if wireType == 4 { 3000 return fmt.Errorf("proto: Message: wiretype end group for non-group") 3001 } 3002 if fieldNum <= 0 { 3003 return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) 3004 } 3005 switch fieldNum { 3006 case 1: 3007 if wireType != 2 { 3008 return fmt.Errorf("proto: wrong wireType = %d for field NewRoundStep", wireType) 3009 } 3010 var msglen int 3011 for shift := uint(0); ; shift += 7 { 3012 if shift >= 64 { 3013 return ErrIntOverflowTypes 3014 } 3015 if iNdEx >= l { 3016 return io.ErrUnexpectedEOF 3017 } 3018 b := dAtA[iNdEx] 3019 iNdEx++ 3020 msglen |= int(b&0x7F) << shift 3021 if b < 0x80 { 3022 break 3023 } 3024 } 3025 if msglen < 0 { 3026 return ErrInvalidLengthTypes 3027 } 3028 postIndex := iNdEx + msglen 3029 if postIndex < 0 { 3030 return ErrInvalidLengthTypes 3031 } 3032 if postIndex > l { 3033 return io.ErrUnexpectedEOF 3034 } 3035 v := &NewRoundStep{} 3036 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3037 return err 3038 } 3039 m.Sum = &Message_NewRoundStep{v} 3040 iNdEx = postIndex 3041 case 2: 3042 if wireType != 2 { 3043 return fmt.Errorf("proto: wrong wireType = %d for field NewValidBlock", wireType) 3044 } 3045 var msglen int 3046 for shift := uint(0); ; shift += 7 { 3047 if shift >= 64 { 3048 return ErrIntOverflowTypes 3049 } 3050 if iNdEx >= l { 3051 return io.ErrUnexpectedEOF 3052 } 3053 b := dAtA[iNdEx] 3054 iNdEx++ 3055 msglen |= int(b&0x7F) << shift 3056 if b < 0x80 { 3057 break 3058 } 3059 } 3060 if msglen < 0 { 3061 return ErrInvalidLengthTypes 3062 } 3063 postIndex := iNdEx + msglen 3064 if postIndex < 0 { 3065 return ErrInvalidLengthTypes 3066 } 3067 if postIndex > l { 3068 return io.ErrUnexpectedEOF 3069 } 3070 v := &NewValidBlock{} 3071 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3072 return err 3073 } 3074 m.Sum = &Message_NewValidBlock{v} 3075 iNdEx = postIndex 3076 case 3: 3077 if wireType != 2 { 3078 return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) 3079 } 3080 var msglen int 3081 for shift := uint(0); ; shift += 7 { 3082 if shift >= 64 { 3083 return ErrIntOverflowTypes 3084 } 3085 if iNdEx >= l { 3086 return io.ErrUnexpectedEOF 3087 } 3088 b := dAtA[iNdEx] 3089 iNdEx++ 3090 msglen |= int(b&0x7F) << shift 3091 if b < 0x80 { 3092 break 3093 } 3094 } 3095 if msglen < 0 { 3096 return ErrInvalidLengthTypes 3097 } 3098 postIndex := iNdEx + msglen 3099 if postIndex < 0 { 3100 return ErrInvalidLengthTypes 3101 } 3102 if postIndex > l { 3103 return io.ErrUnexpectedEOF 3104 } 3105 v := &Proposal{} 3106 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3107 return err 3108 } 3109 m.Sum = &Message_Proposal{v} 3110 iNdEx = postIndex 3111 case 4: 3112 if wireType != 2 { 3113 return fmt.Errorf("proto: wrong wireType = %d for field ProposalPol", wireType) 3114 } 3115 var msglen int 3116 for shift := uint(0); ; shift += 7 { 3117 if shift >= 64 { 3118 return ErrIntOverflowTypes 3119 } 3120 if iNdEx >= l { 3121 return io.ErrUnexpectedEOF 3122 } 3123 b := dAtA[iNdEx] 3124 iNdEx++ 3125 msglen |= int(b&0x7F) << shift 3126 if b < 0x80 { 3127 break 3128 } 3129 } 3130 if msglen < 0 { 3131 return ErrInvalidLengthTypes 3132 } 3133 postIndex := iNdEx + msglen 3134 if postIndex < 0 { 3135 return ErrInvalidLengthTypes 3136 } 3137 if postIndex > l { 3138 return io.ErrUnexpectedEOF 3139 } 3140 v := &ProposalPOL{} 3141 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3142 return err 3143 } 3144 m.Sum = &Message_ProposalPol{v} 3145 iNdEx = postIndex 3146 case 5: 3147 if wireType != 2 { 3148 return fmt.Errorf("proto: wrong wireType = %d for field BlockPart", wireType) 3149 } 3150 var msglen int 3151 for shift := uint(0); ; shift += 7 { 3152 if shift >= 64 { 3153 return ErrIntOverflowTypes 3154 } 3155 if iNdEx >= l { 3156 return io.ErrUnexpectedEOF 3157 } 3158 b := dAtA[iNdEx] 3159 iNdEx++ 3160 msglen |= int(b&0x7F) << shift 3161 if b < 0x80 { 3162 break 3163 } 3164 } 3165 if msglen < 0 { 3166 return ErrInvalidLengthTypes 3167 } 3168 postIndex := iNdEx + msglen 3169 if postIndex < 0 { 3170 return ErrInvalidLengthTypes 3171 } 3172 if postIndex > l { 3173 return io.ErrUnexpectedEOF 3174 } 3175 v := &BlockPart{} 3176 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3177 return err 3178 } 3179 m.Sum = &Message_BlockPart{v} 3180 iNdEx = postIndex 3181 case 6: 3182 if wireType != 2 { 3183 return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) 3184 } 3185 var msglen int 3186 for shift := uint(0); ; shift += 7 { 3187 if shift >= 64 { 3188 return ErrIntOverflowTypes 3189 } 3190 if iNdEx >= l { 3191 return io.ErrUnexpectedEOF 3192 } 3193 b := dAtA[iNdEx] 3194 iNdEx++ 3195 msglen |= int(b&0x7F) << shift 3196 if b < 0x80 { 3197 break 3198 } 3199 } 3200 if msglen < 0 { 3201 return ErrInvalidLengthTypes 3202 } 3203 postIndex := iNdEx + msglen 3204 if postIndex < 0 { 3205 return ErrInvalidLengthTypes 3206 } 3207 if postIndex > l { 3208 return io.ErrUnexpectedEOF 3209 } 3210 v := &Vote{} 3211 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3212 return err 3213 } 3214 m.Sum = &Message_Vote{v} 3215 iNdEx = postIndex 3216 case 7: 3217 if wireType != 2 { 3218 return fmt.Errorf("proto: wrong wireType = %d for field HasVote", wireType) 3219 } 3220 var msglen int 3221 for shift := uint(0); ; shift += 7 { 3222 if shift >= 64 { 3223 return ErrIntOverflowTypes 3224 } 3225 if iNdEx >= l { 3226 return io.ErrUnexpectedEOF 3227 } 3228 b := dAtA[iNdEx] 3229 iNdEx++ 3230 msglen |= int(b&0x7F) << shift 3231 if b < 0x80 { 3232 break 3233 } 3234 } 3235 if msglen < 0 { 3236 return ErrInvalidLengthTypes 3237 } 3238 postIndex := iNdEx + msglen 3239 if postIndex < 0 { 3240 return ErrInvalidLengthTypes 3241 } 3242 if postIndex > l { 3243 return io.ErrUnexpectedEOF 3244 } 3245 v := &HasVote{} 3246 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3247 return err 3248 } 3249 m.Sum = &Message_HasVote{v} 3250 iNdEx = postIndex 3251 case 8: 3252 if wireType != 2 { 3253 return fmt.Errorf("proto: wrong wireType = %d for field VoteSetMaj23", wireType) 3254 } 3255 var msglen int 3256 for shift := uint(0); ; shift += 7 { 3257 if shift >= 64 { 3258 return ErrIntOverflowTypes 3259 } 3260 if iNdEx >= l { 3261 return io.ErrUnexpectedEOF 3262 } 3263 b := dAtA[iNdEx] 3264 iNdEx++ 3265 msglen |= int(b&0x7F) << shift 3266 if b < 0x80 { 3267 break 3268 } 3269 } 3270 if msglen < 0 { 3271 return ErrInvalidLengthTypes 3272 } 3273 postIndex := iNdEx + msglen 3274 if postIndex < 0 { 3275 return ErrInvalidLengthTypes 3276 } 3277 if postIndex > l { 3278 return io.ErrUnexpectedEOF 3279 } 3280 v := &VoteSetMaj23{} 3281 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3282 return err 3283 } 3284 m.Sum = &Message_VoteSetMaj23{v} 3285 iNdEx = postIndex 3286 case 9: 3287 if wireType != 2 { 3288 return fmt.Errorf("proto: wrong wireType = %d for field VoteSetBits", wireType) 3289 } 3290 var msglen int 3291 for shift := uint(0); ; shift += 7 { 3292 if shift >= 64 { 3293 return ErrIntOverflowTypes 3294 } 3295 if iNdEx >= l { 3296 return io.ErrUnexpectedEOF 3297 } 3298 b := dAtA[iNdEx] 3299 iNdEx++ 3300 msglen |= int(b&0x7F) << shift 3301 if b < 0x80 { 3302 break 3303 } 3304 } 3305 if msglen < 0 { 3306 return ErrInvalidLengthTypes 3307 } 3308 postIndex := iNdEx + msglen 3309 if postIndex < 0 { 3310 return ErrInvalidLengthTypes 3311 } 3312 if postIndex > l { 3313 return io.ErrUnexpectedEOF 3314 } 3315 v := &VoteSetBits{} 3316 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3317 return err 3318 } 3319 m.Sum = &Message_VoteSetBits{v} 3320 iNdEx = postIndex 3321 default: 3322 iNdEx = preIndex 3323 skippy, err := skipTypes(dAtA[iNdEx:]) 3324 if err != nil { 3325 return err 3326 } 3327 if (skippy < 0) || (iNdEx+skippy) < 0 { 3328 return ErrInvalidLengthTypes 3329 } 3330 if (iNdEx + skippy) > l { 3331 return io.ErrUnexpectedEOF 3332 } 3333 iNdEx += skippy 3334 } 3335 } 3336 3337 if iNdEx > l { 3338 return io.ErrUnexpectedEOF 3339 } 3340 return nil 3341 } 3342 func skipTypes(dAtA []byte) (n int, err error) { 3343 l := len(dAtA) 3344 iNdEx := 0 3345 depth := 0 3346 for iNdEx < l { 3347 var wire uint64 3348 for shift := uint(0); ; shift += 7 { 3349 if shift >= 64 { 3350 return 0, ErrIntOverflowTypes 3351 } 3352 if iNdEx >= l { 3353 return 0, io.ErrUnexpectedEOF 3354 } 3355 b := dAtA[iNdEx] 3356 iNdEx++ 3357 wire |= (uint64(b) & 0x7F) << shift 3358 if b < 0x80 { 3359 break 3360 } 3361 } 3362 wireType := int(wire & 0x7) 3363 switch wireType { 3364 case 0: 3365 for shift := uint(0); ; shift += 7 { 3366 if shift >= 64 { 3367 return 0, ErrIntOverflowTypes 3368 } 3369 if iNdEx >= l { 3370 return 0, io.ErrUnexpectedEOF 3371 } 3372 iNdEx++ 3373 if dAtA[iNdEx-1] < 0x80 { 3374 break 3375 } 3376 } 3377 case 1: 3378 iNdEx += 8 3379 case 2: 3380 var length int 3381 for shift := uint(0); ; shift += 7 { 3382 if shift >= 64 { 3383 return 0, ErrIntOverflowTypes 3384 } 3385 if iNdEx >= l { 3386 return 0, io.ErrUnexpectedEOF 3387 } 3388 b := dAtA[iNdEx] 3389 iNdEx++ 3390 length |= (int(b) & 0x7F) << shift 3391 if b < 0x80 { 3392 break 3393 } 3394 } 3395 if length < 0 { 3396 return 0, ErrInvalidLengthTypes 3397 } 3398 iNdEx += length 3399 case 3: 3400 depth++ 3401 case 4: 3402 if depth == 0 { 3403 return 0, ErrUnexpectedEndOfGroupTypes 3404 } 3405 depth-- 3406 case 5: 3407 iNdEx += 4 3408 default: 3409 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 3410 } 3411 if iNdEx < 0 { 3412 return 0, ErrInvalidLengthTypes 3413 } 3414 if depth == 0 { 3415 return iNdEx, nil 3416 } 3417 } 3418 return 0, io.ErrUnexpectedEOF 3419 } 3420 3421 var ( 3422 ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") 3423 ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") 3424 ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") 3425 )