github.com/adoriasoft/tendermint@v0.34.0-dev1.0.20200722151356-96d84601a75a/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 bits "github.com/adoriasoft/tendermint/proto/tendermint/libs/bits" 9 types "github.com/adoriasoft/tendermint/proto/tendermint/types" 10 _ "github.com/gogo/protobuf/gogoproto" 11 proto "github.com/gogo/protobuf/proto" 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 // 858 bytes of a gzipped FileDescriptorProto 805 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xcd, 0x8e, 0xe3, 0x44, 806 0x10, 0xb6, 0x19, 0x67, 0x92, 0x94, 0x93, 0x19, 0x68, 0xcd, 0xae, 0x42, 0x80, 0x24, 0x98, 0xcb, 807 0x08, 0x21, 0x07, 0x65, 0x0e, 0x48, 0x0b, 0x12, 0x60, 0x7e, 0xd6, 0xbb, 0xda, 0xec, 0x46, 0xce, 808 0xb2, 0x42, 0x5c, 0x2c, 0x27, 0x6e, 0x92, 0x66, 0x63, 0xb7, 0xe5, 0xee, 0x64, 0x98, 0x2b, 0x4f, 809 0xc0, 0x03, 0xf0, 0x1a, 0x48, 0x3c, 0xc2, 0x1e, 0xf7, 0xc8, 0x69, 0x85, 0x32, 0x8f, 0x80, 0xe0, 810 0x8c, 0xba, 0xdd, 0x49, 0x3a, 0xac, 0x67, 0x60, 0x2e, 0x48, 0xdc, 0xdc, 0xae, 0xaa, 0xaf, 0xab, 811 0xbe, 0xaa, 0xfa, 0x6c, 0xe8, 0x71, 0x9c, 0xc6, 0x38, 0x4f, 0x48, 0xca, 0xfb, 0x53, 0x9a, 0x32, 812 0x9c, 0xb2, 0x25, 0xeb, 0xf3, 0x8b, 0x0c, 0x33, 0x37, 0xcb, 0x29, 0xa7, 0xe8, 0x64, 0xe7, 0xe1, 813 0x6e, 0x3d, 0xda, 0x27, 0x33, 0x3a, 0xa3, 0xd2, 0xa1, 0x2f, 0x9e, 0x0a, 0xdf, 0xf6, 0x9b, 0x1a, 814 0x9a, 0xc4, 0xd0, 0x91, 0xda, 0xfa, 0x5d, 0x0b, 0x32, 0x61, 0xfd, 0x09, 0xe1, 0x7b, 0x1e, 0xce, 815 0xcf, 0x26, 0x34, 0x1e, 0xe2, 0xf3, 0x80, 0x2e, 0xd3, 0x78, 0xcc, 0x71, 0x86, 0x6e, 0xc3, 0xe1, 816 0x1c, 0x93, 0xd9, 0x9c, 0xb7, 0xcc, 0x9e, 0x79, 0x7a, 0x10, 0xa8, 0x13, 0x3a, 0x81, 0x4a, 0x2e, 817 0x9c, 0x5a, 0xaf, 0xf4, 0xcc, 0xd3, 0x4a, 0x50, 0x1c, 0x10, 0x02, 0x8b, 0x71, 0x9c, 0xb5, 0x0e, 818 0x7a, 0xe6, 0x69, 0x33, 0x90, 0xcf, 0xe8, 0x03, 0x68, 0x31, 0x3c, 0xa5, 0x69, 0xcc, 0x42, 0x46, 819 0xd2, 0x29, 0x0e, 0x19, 0x8f, 0x72, 0x1e, 0x72, 0x92, 0xe0, 0x96, 0x25, 0x31, 0x6f, 0x29, 0xfb, 820 0x58, 0x98, 0xc7, 0xc2, 0xfa, 0x98, 0x24, 0x18, 0xbd, 0x0b, 0xaf, 0x2d, 0x22, 0xc6, 0xc3, 0x29, 821 0x4d, 0x12, 0xc2, 0xc3, 0xe2, 0xba, 0x8a, 0xbc, 0xee, 0x58, 0x18, 0x3e, 0x93, 0xef, 0x65, 0xaa, 822 0xce, 0x1f, 0x26, 0x34, 0x1f, 0xe2, 0xf3, 0x27, 0xd1, 0x82, 0xc4, 0xde, 0x82, 0x4e, 0x9f, 0xde, 823 0x30, 0xf1, 0xaf, 0xe1, 0xd6, 0x44, 0x84, 0x85, 0x99, 0xc8, 0x8d, 0x61, 0x1e, 0xce, 0x71, 0x14, 824 0xe3, 0x5c, 0x56, 0x62, 0x0f, 0xba, 0xae, 0xd6, 0x83, 0x82, 0xaf, 0x51, 0x94, 0xf3, 0x31, 0xe6, 825 0xbe, 0x74, 0xf3, 0xac, 0x67, 0x2f, 0xba, 0x46, 0x80, 0x24, 0xc6, 0x9e, 0x05, 0x7d, 0x0c, 0xf6, 826 0x0e, 0x99, 0xc9, 0x8a, 0xed, 0x41, 0x47, 0xc7, 0x13, 0x9d, 0x70, 0x45, 0x27, 0x5c, 0x8f, 0xf0, 827 0x4f, 0xf3, 0x3c, 0xba, 0x08, 0x60, 0x0b, 0xc4, 0xd0, 0x1b, 0x50, 0x27, 0x4c, 0x91, 0x20, 0xcb, 828 0xaf, 0x05, 0x35, 0xc2, 0x8a, 0xe2, 0x1d, 0x1f, 0x6a, 0xa3, 0x9c, 0x66, 0x94, 0x45, 0x0b, 0xf4, 829 0x11, 0xd4, 0x32, 0xf5, 0x2c, 0x6b, 0xb6, 0x07, 0xed, 0x92, 0xb4, 0x95, 0x87, 0xca, 0x78, 0x1b, 830 0xe1, 0xfc, 0x64, 0x82, 0xbd, 0x31, 0x8e, 0x1e, 0x3d, 0xb8, 0x92, 0xbf, 0xf7, 0x00, 0x6d, 0x62, 831 0xc2, 0x8c, 0x2e, 0x42, 0x9d, 0xcc, 0x57, 0x37, 0x96, 0x11, 0x5d, 0xc8, 0xbe, 0xa0, 0xbb, 0xd0, 832 0xd0, 0xbd, 0x15, 0x9d, 0xff, 0x50, 0xbe, 0xca, 0xcd, 0xd6, 0xd0, 0x9c, 0xa7, 0x50, 0xf7, 0x36, 833 0x9c, 0xdc, 0xb0, 0xb7, 0xef, 0x83, 0x25, 0xb8, 0x57, 0x77, 0xdf, 0x2e, 0x6f, 0xa5, 0xba, 0x53, 834 0x7a, 0x3a, 0x03, 0xb0, 0x9e, 0x50, 0x2e, 0x26, 0xd0, 0x5a, 0x51, 0x8e, 0x15, 0x9b, 0x25, 0x91, 835 0xc2, 0x2b, 0x90, 0x3e, 0xce, 0x0f, 0x26, 0x54, 0xfd, 0x88, 0xc9, 0xb8, 0x9b, 0xe5, 0x77, 0x06, 836 0x96, 0x40, 0x93, 0xf9, 0x1d, 0x95, 0x8d, 0xda, 0x98, 0xcc, 0x52, 0x1c, 0x0f, 0xd9, 0xec, 0xf1, 837 0x45, 0x86, 0x03, 0xe9, 0x2c, 0xa0, 0x48, 0x1a, 0xe3, 0xef, 0xe5, 0x40, 0x55, 0x82, 0xe2, 0xe0, 838 0xfc, 0x62, 0x42, 0x43, 0x64, 0x30, 0xc6, 0x7c, 0x18, 0x7d, 0x37, 0x38, 0xfb, 0x2f, 0x32, 0xf9, 839 0x02, 0x6a, 0xc5, 0x80, 0x93, 0x58, 0x4d, 0xf7, 0xeb, 0x2f, 0x07, 0xca, 0xde, 0xdd, 0xfb, 0xdc, 840 0x3b, 0x16, 0x2c, 0xaf, 0x5f, 0x74, 0xab, 0xea, 0x45, 0x50, 0x95, 0xb1, 0xf7, 0x62, 0xe7, 0x77, 841 0x13, 0x6c, 0x95, 0xba, 0x47, 0x38, 0xfb, 0xff, 0x64, 0x8e, 0xee, 0x40, 0x45, 0x4c, 0x00, 0x93, 842 0xcb, 0xf9, 0x6f, 0x87, 0xbb, 0x08, 0x71, 0xfe, 0xb4, 0xa0, 0x3a, 0xc4, 0x8c, 0x45, 0x33, 0x8c, 843 0xee, 0xc3, 0x51, 0x8a, 0xcf, 0x8b, 0x85, 0x0a, 0xa5, 0x8c, 0x16, 0x73, 0xe7, 0xb8, 0x65, 0x1f, 844 0x00, 0x57, 0x97, 0x69, 0xdf, 0x08, 0x1a, 0xa9, 0x2e, 0xdb, 0x43, 0x38, 0x16, 0x58, 0x2b, 0xa1, 845 0x87, 0xa1, 0x4c, 0x54, 0xf2, 0x65, 0x0f, 0xde, 0xb9, 0x12, 0x6c, 0xa7, 0x9d, 0xbe, 0x11, 0x34, 846 0xd3, 0x3d, 0x31, 0xd5, 0xa5, 0xa5, 0x64, 0x85, 0x77, 0x38, 0x1b, 0x05, 0xf1, 0x35, 0x69, 0x41, 847 0x5f, 0xfe, 0x4d, 0x04, 0x0a, 0xae, 0xdf, 0xbe, 0x1e, 0x61, 0xf4, 0xe8, 0x81, 0xbf, 0xaf, 0x01, 848 0xe8, 0x13, 0x80, 0x9d, 0x94, 0x2a, 0xb6, 0xbb, 0xe5, 0x28, 0x5b, 0xad, 0xf0, 0x8d, 0xa0, 0xbe, 849 0x15, 0x53, 0x21, 0x05, 0x72, 0xa1, 0x0f, 0x5f, 0x96, 0xc7, 0x5d, 0xac, 0x98, 0x42, 0xdf, 0x28, 850 0xd6, 0x1a, 0xdd, 0x81, 0xda, 0x3c, 0x62, 0xa1, 0x8c, 0xaa, 0xca, 0xa8, 0xb7, 0xca, 0xa3, 0xd4, 851 0xee, 0xfb, 0x46, 0x50, 0x9d, 0x2b, 0x19, 0xb8, 0x0f, 0x47, 0x22, 0x4e, 0x7e, 0x4e, 0x12, 0xb1, 852 0x8e, 0xad, 0xda, 0x75, 0x0d, 0xd5, 0x17, 0x57, 0x34, 0x74, 0xa5, 0x2f, 0xf2, 0x5d, 0x68, 0x6e, 853 0xb1, 0xc4, 0x3c, 0xb5, 0xea, 0xd7, 0x91, 0xa8, 0x2d, 0x92, 0x20, 0x71, 0xb5, 0x3b, 0x7a, 0x15, 854 0x38, 0x60, 0xcb, 0xc4, 0xfb, 0xea, 0xd9, 0xba, 0x63, 0x3e, 0x5f, 0x77, 0xcc, 0xdf, 0xd6, 0x1d, 855 0xf3, 0xc7, 0xcb, 0x8e, 0xf1, 0xfc, 0xb2, 0x63, 0xfc, 0x7a, 0xd9, 0x31, 0xbe, 0xf9, 0x70, 0x46, 856 0xf8, 0x7c, 0x39, 0x71, 0xa7, 0x34, 0xe9, 0x47, 0x31, 0xcd, 0x49, 0xc4, 0xe8, 0xb7, 0xbc, 0xaf, 857 0xfd, 0x3a, 0x14, 0x7f, 0x1d, 0x65, 0xff, 0x2d, 0x93, 0x43, 0x69, 0x3b, 0xfb, 0x2b, 0x00, 0x00, 858 0xff, 0xff, 0x26, 0x2c, 0x30, 0xde, 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 { 1936 return ErrInvalidLengthTypes 1937 } 1938 if (iNdEx + skippy) < 0 { 1939 return ErrInvalidLengthTypes 1940 } 1941 if (iNdEx + skippy) > l { 1942 return io.ErrUnexpectedEOF 1943 } 1944 iNdEx += skippy 1945 } 1946 } 1947 1948 if iNdEx > l { 1949 return io.ErrUnexpectedEOF 1950 } 1951 return nil 1952 } 1953 func (m *NewValidBlock) Unmarshal(dAtA []byte) error { 1954 l := len(dAtA) 1955 iNdEx := 0 1956 for iNdEx < l { 1957 preIndex := iNdEx 1958 var wire uint64 1959 for shift := uint(0); ; shift += 7 { 1960 if shift >= 64 { 1961 return ErrIntOverflowTypes 1962 } 1963 if iNdEx >= l { 1964 return io.ErrUnexpectedEOF 1965 } 1966 b := dAtA[iNdEx] 1967 iNdEx++ 1968 wire |= uint64(b&0x7F) << shift 1969 if b < 0x80 { 1970 break 1971 } 1972 } 1973 fieldNum := int32(wire >> 3) 1974 wireType := int(wire & 0x7) 1975 if wireType == 4 { 1976 return fmt.Errorf("proto: NewValidBlock: wiretype end group for non-group") 1977 } 1978 if fieldNum <= 0 { 1979 return fmt.Errorf("proto: NewValidBlock: illegal tag %d (wire type %d)", fieldNum, wire) 1980 } 1981 switch fieldNum { 1982 case 1: 1983 if wireType != 0 { 1984 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 1985 } 1986 m.Height = 0 1987 for shift := uint(0); ; shift += 7 { 1988 if shift >= 64 { 1989 return ErrIntOverflowTypes 1990 } 1991 if iNdEx >= l { 1992 return io.ErrUnexpectedEOF 1993 } 1994 b := dAtA[iNdEx] 1995 iNdEx++ 1996 m.Height |= int64(b&0x7F) << shift 1997 if b < 0x80 { 1998 break 1999 } 2000 } 2001 case 2: 2002 if wireType != 0 { 2003 return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) 2004 } 2005 m.Round = 0 2006 for shift := uint(0); ; shift += 7 { 2007 if shift >= 64 { 2008 return ErrIntOverflowTypes 2009 } 2010 if iNdEx >= l { 2011 return io.ErrUnexpectedEOF 2012 } 2013 b := dAtA[iNdEx] 2014 iNdEx++ 2015 m.Round |= int32(b&0x7F) << shift 2016 if b < 0x80 { 2017 break 2018 } 2019 } 2020 case 3: 2021 if wireType != 2 { 2022 return fmt.Errorf("proto: wrong wireType = %d for field BlockPartSetHeader", wireType) 2023 } 2024 var msglen int 2025 for shift := uint(0); ; shift += 7 { 2026 if shift >= 64 { 2027 return ErrIntOverflowTypes 2028 } 2029 if iNdEx >= l { 2030 return io.ErrUnexpectedEOF 2031 } 2032 b := dAtA[iNdEx] 2033 iNdEx++ 2034 msglen |= int(b&0x7F) << shift 2035 if b < 0x80 { 2036 break 2037 } 2038 } 2039 if msglen < 0 { 2040 return ErrInvalidLengthTypes 2041 } 2042 postIndex := iNdEx + msglen 2043 if postIndex < 0 { 2044 return ErrInvalidLengthTypes 2045 } 2046 if postIndex > l { 2047 return io.ErrUnexpectedEOF 2048 } 2049 if err := m.BlockPartSetHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2050 return err 2051 } 2052 iNdEx = postIndex 2053 case 4: 2054 if wireType != 2 { 2055 return fmt.Errorf("proto: wrong wireType = %d for field BlockParts", wireType) 2056 } 2057 var msglen int 2058 for shift := uint(0); ; shift += 7 { 2059 if shift >= 64 { 2060 return ErrIntOverflowTypes 2061 } 2062 if iNdEx >= l { 2063 return io.ErrUnexpectedEOF 2064 } 2065 b := dAtA[iNdEx] 2066 iNdEx++ 2067 msglen |= int(b&0x7F) << shift 2068 if b < 0x80 { 2069 break 2070 } 2071 } 2072 if msglen < 0 { 2073 return ErrInvalidLengthTypes 2074 } 2075 postIndex := iNdEx + msglen 2076 if postIndex < 0 { 2077 return ErrInvalidLengthTypes 2078 } 2079 if postIndex > l { 2080 return io.ErrUnexpectedEOF 2081 } 2082 if m.BlockParts == nil { 2083 m.BlockParts = &bits.BitArray{} 2084 } 2085 if err := m.BlockParts.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2086 return err 2087 } 2088 iNdEx = postIndex 2089 case 5: 2090 if wireType != 0 { 2091 return fmt.Errorf("proto: wrong wireType = %d for field IsCommit", wireType) 2092 } 2093 var v int 2094 for shift := uint(0); ; shift += 7 { 2095 if shift >= 64 { 2096 return ErrIntOverflowTypes 2097 } 2098 if iNdEx >= l { 2099 return io.ErrUnexpectedEOF 2100 } 2101 b := dAtA[iNdEx] 2102 iNdEx++ 2103 v |= int(b&0x7F) << shift 2104 if b < 0x80 { 2105 break 2106 } 2107 } 2108 m.IsCommit = bool(v != 0) 2109 default: 2110 iNdEx = preIndex 2111 skippy, err := skipTypes(dAtA[iNdEx:]) 2112 if err != nil { 2113 return err 2114 } 2115 if skippy < 0 { 2116 return ErrInvalidLengthTypes 2117 } 2118 if (iNdEx + skippy) < 0 { 2119 return ErrInvalidLengthTypes 2120 } 2121 if (iNdEx + skippy) > l { 2122 return io.ErrUnexpectedEOF 2123 } 2124 iNdEx += skippy 2125 } 2126 } 2127 2128 if iNdEx > l { 2129 return io.ErrUnexpectedEOF 2130 } 2131 return nil 2132 } 2133 func (m *Proposal) Unmarshal(dAtA []byte) error { 2134 l := len(dAtA) 2135 iNdEx := 0 2136 for iNdEx < l { 2137 preIndex := iNdEx 2138 var wire uint64 2139 for shift := uint(0); ; shift += 7 { 2140 if shift >= 64 { 2141 return ErrIntOverflowTypes 2142 } 2143 if iNdEx >= l { 2144 return io.ErrUnexpectedEOF 2145 } 2146 b := dAtA[iNdEx] 2147 iNdEx++ 2148 wire |= uint64(b&0x7F) << shift 2149 if b < 0x80 { 2150 break 2151 } 2152 } 2153 fieldNum := int32(wire >> 3) 2154 wireType := int(wire & 0x7) 2155 if wireType == 4 { 2156 return fmt.Errorf("proto: Proposal: wiretype end group for non-group") 2157 } 2158 if fieldNum <= 0 { 2159 return fmt.Errorf("proto: Proposal: illegal tag %d (wire type %d)", fieldNum, wire) 2160 } 2161 switch fieldNum { 2162 case 1: 2163 if wireType != 2 { 2164 return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) 2165 } 2166 var msglen int 2167 for shift := uint(0); ; shift += 7 { 2168 if shift >= 64 { 2169 return ErrIntOverflowTypes 2170 } 2171 if iNdEx >= l { 2172 return io.ErrUnexpectedEOF 2173 } 2174 b := dAtA[iNdEx] 2175 iNdEx++ 2176 msglen |= int(b&0x7F) << shift 2177 if b < 0x80 { 2178 break 2179 } 2180 } 2181 if msglen < 0 { 2182 return ErrInvalidLengthTypes 2183 } 2184 postIndex := iNdEx + msglen 2185 if postIndex < 0 { 2186 return ErrInvalidLengthTypes 2187 } 2188 if postIndex > l { 2189 return io.ErrUnexpectedEOF 2190 } 2191 if err := m.Proposal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2192 return err 2193 } 2194 iNdEx = postIndex 2195 default: 2196 iNdEx = preIndex 2197 skippy, err := skipTypes(dAtA[iNdEx:]) 2198 if err != nil { 2199 return err 2200 } 2201 if skippy < 0 { 2202 return ErrInvalidLengthTypes 2203 } 2204 if (iNdEx + skippy) < 0 { 2205 return ErrInvalidLengthTypes 2206 } 2207 if (iNdEx + skippy) > l { 2208 return io.ErrUnexpectedEOF 2209 } 2210 iNdEx += skippy 2211 } 2212 } 2213 2214 if iNdEx > l { 2215 return io.ErrUnexpectedEOF 2216 } 2217 return nil 2218 } 2219 func (m *ProposalPOL) Unmarshal(dAtA []byte) error { 2220 l := len(dAtA) 2221 iNdEx := 0 2222 for iNdEx < l { 2223 preIndex := iNdEx 2224 var wire uint64 2225 for shift := uint(0); ; shift += 7 { 2226 if shift >= 64 { 2227 return ErrIntOverflowTypes 2228 } 2229 if iNdEx >= l { 2230 return io.ErrUnexpectedEOF 2231 } 2232 b := dAtA[iNdEx] 2233 iNdEx++ 2234 wire |= uint64(b&0x7F) << shift 2235 if b < 0x80 { 2236 break 2237 } 2238 } 2239 fieldNum := int32(wire >> 3) 2240 wireType := int(wire & 0x7) 2241 if wireType == 4 { 2242 return fmt.Errorf("proto: ProposalPOL: wiretype end group for non-group") 2243 } 2244 if fieldNum <= 0 { 2245 return fmt.Errorf("proto: ProposalPOL: illegal tag %d (wire type %d)", fieldNum, wire) 2246 } 2247 switch fieldNum { 2248 case 1: 2249 if wireType != 0 { 2250 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 2251 } 2252 m.Height = 0 2253 for shift := uint(0); ; shift += 7 { 2254 if shift >= 64 { 2255 return ErrIntOverflowTypes 2256 } 2257 if iNdEx >= l { 2258 return io.ErrUnexpectedEOF 2259 } 2260 b := dAtA[iNdEx] 2261 iNdEx++ 2262 m.Height |= int64(b&0x7F) << shift 2263 if b < 0x80 { 2264 break 2265 } 2266 } 2267 case 2: 2268 if wireType != 0 { 2269 return fmt.Errorf("proto: wrong wireType = %d for field ProposalPolRound", wireType) 2270 } 2271 m.ProposalPolRound = 0 2272 for shift := uint(0); ; shift += 7 { 2273 if shift >= 64 { 2274 return ErrIntOverflowTypes 2275 } 2276 if iNdEx >= l { 2277 return io.ErrUnexpectedEOF 2278 } 2279 b := dAtA[iNdEx] 2280 iNdEx++ 2281 m.ProposalPolRound |= int32(b&0x7F) << shift 2282 if b < 0x80 { 2283 break 2284 } 2285 } 2286 case 3: 2287 if wireType != 2 { 2288 return fmt.Errorf("proto: wrong wireType = %d for field ProposalPol", wireType) 2289 } 2290 var msglen int 2291 for shift := uint(0); ; shift += 7 { 2292 if shift >= 64 { 2293 return ErrIntOverflowTypes 2294 } 2295 if iNdEx >= l { 2296 return io.ErrUnexpectedEOF 2297 } 2298 b := dAtA[iNdEx] 2299 iNdEx++ 2300 msglen |= int(b&0x7F) << shift 2301 if b < 0x80 { 2302 break 2303 } 2304 } 2305 if msglen < 0 { 2306 return ErrInvalidLengthTypes 2307 } 2308 postIndex := iNdEx + msglen 2309 if postIndex < 0 { 2310 return ErrInvalidLengthTypes 2311 } 2312 if postIndex > l { 2313 return io.ErrUnexpectedEOF 2314 } 2315 if err := m.ProposalPol.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2316 return err 2317 } 2318 iNdEx = postIndex 2319 default: 2320 iNdEx = preIndex 2321 skippy, err := skipTypes(dAtA[iNdEx:]) 2322 if err != nil { 2323 return err 2324 } 2325 if skippy < 0 { 2326 return ErrInvalidLengthTypes 2327 } 2328 if (iNdEx + skippy) < 0 { 2329 return ErrInvalidLengthTypes 2330 } 2331 if (iNdEx + skippy) > l { 2332 return io.ErrUnexpectedEOF 2333 } 2334 iNdEx += skippy 2335 } 2336 } 2337 2338 if iNdEx > l { 2339 return io.ErrUnexpectedEOF 2340 } 2341 return nil 2342 } 2343 func (m *BlockPart) Unmarshal(dAtA []byte) error { 2344 l := len(dAtA) 2345 iNdEx := 0 2346 for iNdEx < l { 2347 preIndex := iNdEx 2348 var wire uint64 2349 for shift := uint(0); ; shift += 7 { 2350 if shift >= 64 { 2351 return ErrIntOverflowTypes 2352 } 2353 if iNdEx >= l { 2354 return io.ErrUnexpectedEOF 2355 } 2356 b := dAtA[iNdEx] 2357 iNdEx++ 2358 wire |= uint64(b&0x7F) << shift 2359 if b < 0x80 { 2360 break 2361 } 2362 } 2363 fieldNum := int32(wire >> 3) 2364 wireType := int(wire & 0x7) 2365 if wireType == 4 { 2366 return fmt.Errorf("proto: BlockPart: wiretype end group for non-group") 2367 } 2368 if fieldNum <= 0 { 2369 return fmt.Errorf("proto: BlockPart: illegal tag %d (wire type %d)", fieldNum, wire) 2370 } 2371 switch fieldNum { 2372 case 1: 2373 if wireType != 0 { 2374 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 2375 } 2376 m.Height = 0 2377 for shift := uint(0); ; shift += 7 { 2378 if shift >= 64 { 2379 return ErrIntOverflowTypes 2380 } 2381 if iNdEx >= l { 2382 return io.ErrUnexpectedEOF 2383 } 2384 b := dAtA[iNdEx] 2385 iNdEx++ 2386 m.Height |= int64(b&0x7F) << shift 2387 if b < 0x80 { 2388 break 2389 } 2390 } 2391 case 2: 2392 if wireType != 0 { 2393 return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) 2394 } 2395 m.Round = 0 2396 for shift := uint(0); ; shift += 7 { 2397 if shift >= 64 { 2398 return ErrIntOverflowTypes 2399 } 2400 if iNdEx >= l { 2401 return io.ErrUnexpectedEOF 2402 } 2403 b := dAtA[iNdEx] 2404 iNdEx++ 2405 m.Round |= int32(b&0x7F) << shift 2406 if b < 0x80 { 2407 break 2408 } 2409 } 2410 case 3: 2411 if wireType != 2 { 2412 return fmt.Errorf("proto: wrong wireType = %d for field Part", wireType) 2413 } 2414 var msglen int 2415 for shift := uint(0); ; shift += 7 { 2416 if shift >= 64 { 2417 return ErrIntOverflowTypes 2418 } 2419 if iNdEx >= l { 2420 return io.ErrUnexpectedEOF 2421 } 2422 b := dAtA[iNdEx] 2423 iNdEx++ 2424 msglen |= int(b&0x7F) << shift 2425 if b < 0x80 { 2426 break 2427 } 2428 } 2429 if msglen < 0 { 2430 return ErrInvalidLengthTypes 2431 } 2432 postIndex := iNdEx + msglen 2433 if postIndex < 0 { 2434 return ErrInvalidLengthTypes 2435 } 2436 if postIndex > l { 2437 return io.ErrUnexpectedEOF 2438 } 2439 if err := m.Part.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2440 return err 2441 } 2442 iNdEx = postIndex 2443 default: 2444 iNdEx = preIndex 2445 skippy, err := skipTypes(dAtA[iNdEx:]) 2446 if err != nil { 2447 return err 2448 } 2449 if skippy < 0 { 2450 return ErrInvalidLengthTypes 2451 } 2452 if (iNdEx + skippy) < 0 { 2453 return ErrInvalidLengthTypes 2454 } 2455 if (iNdEx + skippy) > l { 2456 return io.ErrUnexpectedEOF 2457 } 2458 iNdEx += skippy 2459 } 2460 } 2461 2462 if iNdEx > l { 2463 return io.ErrUnexpectedEOF 2464 } 2465 return nil 2466 } 2467 func (m *Vote) Unmarshal(dAtA []byte) error { 2468 l := len(dAtA) 2469 iNdEx := 0 2470 for iNdEx < l { 2471 preIndex := iNdEx 2472 var wire uint64 2473 for shift := uint(0); ; shift += 7 { 2474 if shift >= 64 { 2475 return ErrIntOverflowTypes 2476 } 2477 if iNdEx >= l { 2478 return io.ErrUnexpectedEOF 2479 } 2480 b := dAtA[iNdEx] 2481 iNdEx++ 2482 wire |= uint64(b&0x7F) << shift 2483 if b < 0x80 { 2484 break 2485 } 2486 } 2487 fieldNum := int32(wire >> 3) 2488 wireType := int(wire & 0x7) 2489 if wireType == 4 { 2490 return fmt.Errorf("proto: Vote: wiretype end group for non-group") 2491 } 2492 if fieldNum <= 0 { 2493 return fmt.Errorf("proto: Vote: illegal tag %d (wire type %d)", fieldNum, wire) 2494 } 2495 switch fieldNum { 2496 case 1: 2497 if wireType != 2 { 2498 return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) 2499 } 2500 var msglen int 2501 for shift := uint(0); ; shift += 7 { 2502 if shift >= 64 { 2503 return ErrIntOverflowTypes 2504 } 2505 if iNdEx >= l { 2506 return io.ErrUnexpectedEOF 2507 } 2508 b := dAtA[iNdEx] 2509 iNdEx++ 2510 msglen |= int(b&0x7F) << shift 2511 if b < 0x80 { 2512 break 2513 } 2514 } 2515 if msglen < 0 { 2516 return ErrInvalidLengthTypes 2517 } 2518 postIndex := iNdEx + msglen 2519 if postIndex < 0 { 2520 return ErrInvalidLengthTypes 2521 } 2522 if postIndex > l { 2523 return io.ErrUnexpectedEOF 2524 } 2525 if m.Vote == nil { 2526 m.Vote = &types.Vote{} 2527 } 2528 if err := m.Vote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2529 return err 2530 } 2531 iNdEx = postIndex 2532 default: 2533 iNdEx = preIndex 2534 skippy, err := skipTypes(dAtA[iNdEx:]) 2535 if err != nil { 2536 return err 2537 } 2538 if skippy < 0 { 2539 return ErrInvalidLengthTypes 2540 } 2541 if (iNdEx + skippy) < 0 { 2542 return ErrInvalidLengthTypes 2543 } 2544 if (iNdEx + skippy) > l { 2545 return io.ErrUnexpectedEOF 2546 } 2547 iNdEx += skippy 2548 } 2549 } 2550 2551 if iNdEx > l { 2552 return io.ErrUnexpectedEOF 2553 } 2554 return nil 2555 } 2556 func (m *HasVote) Unmarshal(dAtA []byte) error { 2557 l := len(dAtA) 2558 iNdEx := 0 2559 for iNdEx < l { 2560 preIndex := iNdEx 2561 var wire uint64 2562 for shift := uint(0); ; shift += 7 { 2563 if shift >= 64 { 2564 return ErrIntOverflowTypes 2565 } 2566 if iNdEx >= l { 2567 return io.ErrUnexpectedEOF 2568 } 2569 b := dAtA[iNdEx] 2570 iNdEx++ 2571 wire |= uint64(b&0x7F) << shift 2572 if b < 0x80 { 2573 break 2574 } 2575 } 2576 fieldNum := int32(wire >> 3) 2577 wireType := int(wire & 0x7) 2578 if wireType == 4 { 2579 return fmt.Errorf("proto: HasVote: wiretype end group for non-group") 2580 } 2581 if fieldNum <= 0 { 2582 return fmt.Errorf("proto: HasVote: illegal tag %d (wire type %d)", fieldNum, wire) 2583 } 2584 switch fieldNum { 2585 case 1: 2586 if wireType != 0 { 2587 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 2588 } 2589 m.Height = 0 2590 for shift := uint(0); ; shift += 7 { 2591 if shift >= 64 { 2592 return ErrIntOverflowTypes 2593 } 2594 if iNdEx >= l { 2595 return io.ErrUnexpectedEOF 2596 } 2597 b := dAtA[iNdEx] 2598 iNdEx++ 2599 m.Height |= int64(b&0x7F) << shift 2600 if b < 0x80 { 2601 break 2602 } 2603 } 2604 case 2: 2605 if wireType != 0 { 2606 return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) 2607 } 2608 m.Round = 0 2609 for shift := uint(0); ; shift += 7 { 2610 if shift >= 64 { 2611 return ErrIntOverflowTypes 2612 } 2613 if iNdEx >= l { 2614 return io.ErrUnexpectedEOF 2615 } 2616 b := dAtA[iNdEx] 2617 iNdEx++ 2618 m.Round |= int32(b&0x7F) << shift 2619 if b < 0x80 { 2620 break 2621 } 2622 } 2623 case 3: 2624 if wireType != 0 { 2625 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 2626 } 2627 m.Type = 0 2628 for shift := uint(0); ; shift += 7 { 2629 if shift >= 64 { 2630 return ErrIntOverflowTypes 2631 } 2632 if iNdEx >= l { 2633 return io.ErrUnexpectedEOF 2634 } 2635 b := dAtA[iNdEx] 2636 iNdEx++ 2637 m.Type |= types.SignedMsgType(b&0x7F) << shift 2638 if b < 0x80 { 2639 break 2640 } 2641 } 2642 case 4: 2643 if wireType != 0 { 2644 return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) 2645 } 2646 m.Index = 0 2647 for shift := uint(0); ; shift += 7 { 2648 if shift >= 64 { 2649 return ErrIntOverflowTypes 2650 } 2651 if iNdEx >= l { 2652 return io.ErrUnexpectedEOF 2653 } 2654 b := dAtA[iNdEx] 2655 iNdEx++ 2656 m.Index |= int32(b&0x7F) << shift 2657 if b < 0x80 { 2658 break 2659 } 2660 } 2661 default: 2662 iNdEx = preIndex 2663 skippy, err := skipTypes(dAtA[iNdEx:]) 2664 if err != nil { 2665 return err 2666 } 2667 if skippy < 0 { 2668 return ErrInvalidLengthTypes 2669 } 2670 if (iNdEx + skippy) < 0 { 2671 return ErrInvalidLengthTypes 2672 } 2673 if (iNdEx + skippy) > l { 2674 return io.ErrUnexpectedEOF 2675 } 2676 iNdEx += skippy 2677 } 2678 } 2679 2680 if iNdEx > l { 2681 return io.ErrUnexpectedEOF 2682 } 2683 return nil 2684 } 2685 func (m *VoteSetMaj23) Unmarshal(dAtA []byte) error { 2686 l := len(dAtA) 2687 iNdEx := 0 2688 for iNdEx < l { 2689 preIndex := iNdEx 2690 var wire uint64 2691 for shift := uint(0); ; shift += 7 { 2692 if shift >= 64 { 2693 return ErrIntOverflowTypes 2694 } 2695 if iNdEx >= l { 2696 return io.ErrUnexpectedEOF 2697 } 2698 b := dAtA[iNdEx] 2699 iNdEx++ 2700 wire |= uint64(b&0x7F) << shift 2701 if b < 0x80 { 2702 break 2703 } 2704 } 2705 fieldNum := int32(wire >> 3) 2706 wireType := int(wire & 0x7) 2707 if wireType == 4 { 2708 return fmt.Errorf("proto: VoteSetMaj23: wiretype end group for non-group") 2709 } 2710 if fieldNum <= 0 { 2711 return fmt.Errorf("proto: VoteSetMaj23: illegal tag %d (wire type %d)", fieldNum, wire) 2712 } 2713 switch fieldNum { 2714 case 1: 2715 if wireType != 0 { 2716 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 2717 } 2718 m.Height = 0 2719 for shift := uint(0); ; shift += 7 { 2720 if shift >= 64 { 2721 return ErrIntOverflowTypes 2722 } 2723 if iNdEx >= l { 2724 return io.ErrUnexpectedEOF 2725 } 2726 b := dAtA[iNdEx] 2727 iNdEx++ 2728 m.Height |= int64(b&0x7F) << shift 2729 if b < 0x80 { 2730 break 2731 } 2732 } 2733 case 2: 2734 if wireType != 0 { 2735 return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) 2736 } 2737 m.Round = 0 2738 for shift := uint(0); ; shift += 7 { 2739 if shift >= 64 { 2740 return ErrIntOverflowTypes 2741 } 2742 if iNdEx >= l { 2743 return io.ErrUnexpectedEOF 2744 } 2745 b := dAtA[iNdEx] 2746 iNdEx++ 2747 m.Round |= int32(b&0x7F) << shift 2748 if b < 0x80 { 2749 break 2750 } 2751 } 2752 case 3: 2753 if wireType != 0 { 2754 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 2755 } 2756 m.Type = 0 2757 for shift := uint(0); ; shift += 7 { 2758 if shift >= 64 { 2759 return ErrIntOverflowTypes 2760 } 2761 if iNdEx >= l { 2762 return io.ErrUnexpectedEOF 2763 } 2764 b := dAtA[iNdEx] 2765 iNdEx++ 2766 m.Type |= types.SignedMsgType(b&0x7F) << shift 2767 if b < 0x80 { 2768 break 2769 } 2770 } 2771 case 4: 2772 if wireType != 2 { 2773 return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) 2774 } 2775 var msglen int 2776 for shift := uint(0); ; shift += 7 { 2777 if shift >= 64 { 2778 return ErrIntOverflowTypes 2779 } 2780 if iNdEx >= l { 2781 return io.ErrUnexpectedEOF 2782 } 2783 b := dAtA[iNdEx] 2784 iNdEx++ 2785 msglen |= int(b&0x7F) << shift 2786 if b < 0x80 { 2787 break 2788 } 2789 } 2790 if msglen < 0 { 2791 return ErrInvalidLengthTypes 2792 } 2793 postIndex := iNdEx + msglen 2794 if postIndex < 0 { 2795 return ErrInvalidLengthTypes 2796 } 2797 if postIndex > l { 2798 return io.ErrUnexpectedEOF 2799 } 2800 if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2801 return err 2802 } 2803 iNdEx = postIndex 2804 default: 2805 iNdEx = preIndex 2806 skippy, err := skipTypes(dAtA[iNdEx:]) 2807 if err != nil { 2808 return err 2809 } 2810 if skippy < 0 { 2811 return ErrInvalidLengthTypes 2812 } 2813 if (iNdEx + skippy) < 0 { 2814 return ErrInvalidLengthTypes 2815 } 2816 if (iNdEx + skippy) > l { 2817 return io.ErrUnexpectedEOF 2818 } 2819 iNdEx += skippy 2820 } 2821 } 2822 2823 if iNdEx > l { 2824 return io.ErrUnexpectedEOF 2825 } 2826 return nil 2827 } 2828 func (m *VoteSetBits) Unmarshal(dAtA []byte) error { 2829 l := len(dAtA) 2830 iNdEx := 0 2831 for iNdEx < l { 2832 preIndex := iNdEx 2833 var wire uint64 2834 for shift := uint(0); ; shift += 7 { 2835 if shift >= 64 { 2836 return ErrIntOverflowTypes 2837 } 2838 if iNdEx >= l { 2839 return io.ErrUnexpectedEOF 2840 } 2841 b := dAtA[iNdEx] 2842 iNdEx++ 2843 wire |= uint64(b&0x7F) << shift 2844 if b < 0x80 { 2845 break 2846 } 2847 } 2848 fieldNum := int32(wire >> 3) 2849 wireType := int(wire & 0x7) 2850 if wireType == 4 { 2851 return fmt.Errorf("proto: VoteSetBits: wiretype end group for non-group") 2852 } 2853 if fieldNum <= 0 { 2854 return fmt.Errorf("proto: VoteSetBits: illegal tag %d (wire type %d)", fieldNum, wire) 2855 } 2856 switch fieldNum { 2857 case 1: 2858 if wireType != 0 { 2859 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 2860 } 2861 m.Height = 0 2862 for shift := uint(0); ; shift += 7 { 2863 if shift >= 64 { 2864 return ErrIntOverflowTypes 2865 } 2866 if iNdEx >= l { 2867 return io.ErrUnexpectedEOF 2868 } 2869 b := dAtA[iNdEx] 2870 iNdEx++ 2871 m.Height |= int64(b&0x7F) << shift 2872 if b < 0x80 { 2873 break 2874 } 2875 } 2876 case 2: 2877 if wireType != 0 { 2878 return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) 2879 } 2880 m.Round = 0 2881 for shift := uint(0); ; shift += 7 { 2882 if shift >= 64 { 2883 return ErrIntOverflowTypes 2884 } 2885 if iNdEx >= l { 2886 return io.ErrUnexpectedEOF 2887 } 2888 b := dAtA[iNdEx] 2889 iNdEx++ 2890 m.Round |= int32(b&0x7F) << shift 2891 if b < 0x80 { 2892 break 2893 } 2894 } 2895 case 3: 2896 if wireType != 0 { 2897 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 2898 } 2899 m.Type = 0 2900 for shift := uint(0); ; shift += 7 { 2901 if shift >= 64 { 2902 return ErrIntOverflowTypes 2903 } 2904 if iNdEx >= l { 2905 return io.ErrUnexpectedEOF 2906 } 2907 b := dAtA[iNdEx] 2908 iNdEx++ 2909 m.Type |= types.SignedMsgType(b&0x7F) << shift 2910 if b < 0x80 { 2911 break 2912 } 2913 } 2914 case 4: 2915 if wireType != 2 { 2916 return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) 2917 } 2918 var msglen int 2919 for shift := uint(0); ; shift += 7 { 2920 if shift >= 64 { 2921 return ErrIntOverflowTypes 2922 } 2923 if iNdEx >= l { 2924 return io.ErrUnexpectedEOF 2925 } 2926 b := dAtA[iNdEx] 2927 iNdEx++ 2928 msglen |= int(b&0x7F) << shift 2929 if b < 0x80 { 2930 break 2931 } 2932 } 2933 if msglen < 0 { 2934 return ErrInvalidLengthTypes 2935 } 2936 postIndex := iNdEx + msglen 2937 if postIndex < 0 { 2938 return ErrInvalidLengthTypes 2939 } 2940 if postIndex > l { 2941 return io.ErrUnexpectedEOF 2942 } 2943 if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2944 return err 2945 } 2946 iNdEx = postIndex 2947 case 5: 2948 if wireType != 2 { 2949 return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType) 2950 } 2951 var msglen int 2952 for shift := uint(0); ; shift += 7 { 2953 if shift >= 64 { 2954 return ErrIntOverflowTypes 2955 } 2956 if iNdEx >= l { 2957 return io.ErrUnexpectedEOF 2958 } 2959 b := dAtA[iNdEx] 2960 iNdEx++ 2961 msglen |= int(b&0x7F) << shift 2962 if b < 0x80 { 2963 break 2964 } 2965 } 2966 if msglen < 0 { 2967 return ErrInvalidLengthTypes 2968 } 2969 postIndex := iNdEx + msglen 2970 if postIndex < 0 { 2971 return ErrInvalidLengthTypes 2972 } 2973 if postIndex > l { 2974 return io.ErrUnexpectedEOF 2975 } 2976 if err := m.Votes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2977 return err 2978 } 2979 iNdEx = postIndex 2980 default: 2981 iNdEx = preIndex 2982 skippy, err := skipTypes(dAtA[iNdEx:]) 2983 if err != nil { 2984 return err 2985 } 2986 if skippy < 0 { 2987 return ErrInvalidLengthTypes 2988 } 2989 if (iNdEx + skippy) < 0 { 2990 return ErrInvalidLengthTypes 2991 } 2992 if (iNdEx + skippy) > l { 2993 return io.ErrUnexpectedEOF 2994 } 2995 iNdEx += skippy 2996 } 2997 } 2998 2999 if iNdEx > l { 3000 return io.ErrUnexpectedEOF 3001 } 3002 return nil 3003 } 3004 func (m *Message) Unmarshal(dAtA []byte) error { 3005 l := len(dAtA) 3006 iNdEx := 0 3007 for iNdEx < l { 3008 preIndex := iNdEx 3009 var wire uint64 3010 for shift := uint(0); ; shift += 7 { 3011 if shift >= 64 { 3012 return ErrIntOverflowTypes 3013 } 3014 if iNdEx >= l { 3015 return io.ErrUnexpectedEOF 3016 } 3017 b := dAtA[iNdEx] 3018 iNdEx++ 3019 wire |= uint64(b&0x7F) << shift 3020 if b < 0x80 { 3021 break 3022 } 3023 } 3024 fieldNum := int32(wire >> 3) 3025 wireType := int(wire & 0x7) 3026 if wireType == 4 { 3027 return fmt.Errorf("proto: Message: wiretype end group for non-group") 3028 } 3029 if fieldNum <= 0 { 3030 return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) 3031 } 3032 switch fieldNum { 3033 case 1: 3034 if wireType != 2 { 3035 return fmt.Errorf("proto: wrong wireType = %d for field NewRoundStep", wireType) 3036 } 3037 var msglen int 3038 for shift := uint(0); ; shift += 7 { 3039 if shift >= 64 { 3040 return ErrIntOverflowTypes 3041 } 3042 if iNdEx >= l { 3043 return io.ErrUnexpectedEOF 3044 } 3045 b := dAtA[iNdEx] 3046 iNdEx++ 3047 msglen |= int(b&0x7F) << shift 3048 if b < 0x80 { 3049 break 3050 } 3051 } 3052 if msglen < 0 { 3053 return ErrInvalidLengthTypes 3054 } 3055 postIndex := iNdEx + msglen 3056 if postIndex < 0 { 3057 return ErrInvalidLengthTypes 3058 } 3059 if postIndex > l { 3060 return io.ErrUnexpectedEOF 3061 } 3062 v := &NewRoundStep{} 3063 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3064 return err 3065 } 3066 m.Sum = &Message_NewRoundStep{v} 3067 iNdEx = postIndex 3068 case 2: 3069 if wireType != 2 { 3070 return fmt.Errorf("proto: wrong wireType = %d for field NewValidBlock", wireType) 3071 } 3072 var msglen int 3073 for shift := uint(0); ; shift += 7 { 3074 if shift >= 64 { 3075 return ErrIntOverflowTypes 3076 } 3077 if iNdEx >= l { 3078 return io.ErrUnexpectedEOF 3079 } 3080 b := dAtA[iNdEx] 3081 iNdEx++ 3082 msglen |= int(b&0x7F) << shift 3083 if b < 0x80 { 3084 break 3085 } 3086 } 3087 if msglen < 0 { 3088 return ErrInvalidLengthTypes 3089 } 3090 postIndex := iNdEx + msglen 3091 if postIndex < 0 { 3092 return ErrInvalidLengthTypes 3093 } 3094 if postIndex > l { 3095 return io.ErrUnexpectedEOF 3096 } 3097 v := &NewValidBlock{} 3098 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3099 return err 3100 } 3101 m.Sum = &Message_NewValidBlock{v} 3102 iNdEx = postIndex 3103 case 3: 3104 if wireType != 2 { 3105 return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) 3106 } 3107 var msglen int 3108 for shift := uint(0); ; shift += 7 { 3109 if shift >= 64 { 3110 return ErrIntOverflowTypes 3111 } 3112 if iNdEx >= l { 3113 return io.ErrUnexpectedEOF 3114 } 3115 b := dAtA[iNdEx] 3116 iNdEx++ 3117 msglen |= int(b&0x7F) << shift 3118 if b < 0x80 { 3119 break 3120 } 3121 } 3122 if msglen < 0 { 3123 return ErrInvalidLengthTypes 3124 } 3125 postIndex := iNdEx + msglen 3126 if postIndex < 0 { 3127 return ErrInvalidLengthTypes 3128 } 3129 if postIndex > l { 3130 return io.ErrUnexpectedEOF 3131 } 3132 v := &Proposal{} 3133 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3134 return err 3135 } 3136 m.Sum = &Message_Proposal{v} 3137 iNdEx = postIndex 3138 case 4: 3139 if wireType != 2 { 3140 return fmt.Errorf("proto: wrong wireType = %d for field ProposalPol", wireType) 3141 } 3142 var msglen int 3143 for shift := uint(0); ; shift += 7 { 3144 if shift >= 64 { 3145 return ErrIntOverflowTypes 3146 } 3147 if iNdEx >= l { 3148 return io.ErrUnexpectedEOF 3149 } 3150 b := dAtA[iNdEx] 3151 iNdEx++ 3152 msglen |= int(b&0x7F) << shift 3153 if b < 0x80 { 3154 break 3155 } 3156 } 3157 if msglen < 0 { 3158 return ErrInvalidLengthTypes 3159 } 3160 postIndex := iNdEx + msglen 3161 if postIndex < 0 { 3162 return ErrInvalidLengthTypes 3163 } 3164 if postIndex > l { 3165 return io.ErrUnexpectedEOF 3166 } 3167 v := &ProposalPOL{} 3168 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3169 return err 3170 } 3171 m.Sum = &Message_ProposalPol{v} 3172 iNdEx = postIndex 3173 case 5: 3174 if wireType != 2 { 3175 return fmt.Errorf("proto: wrong wireType = %d for field BlockPart", wireType) 3176 } 3177 var msglen int 3178 for shift := uint(0); ; shift += 7 { 3179 if shift >= 64 { 3180 return ErrIntOverflowTypes 3181 } 3182 if iNdEx >= l { 3183 return io.ErrUnexpectedEOF 3184 } 3185 b := dAtA[iNdEx] 3186 iNdEx++ 3187 msglen |= int(b&0x7F) << shift 3188 if b < 0x80 { 3189 break 3190 } 3191 } 3192 if msglen < 0 { 3193 return ErrInvalidLengthTypes 3194 } 3195 postIndex := iNdEx + msglen 3196 if postIndex < 0 { 3197 return ErrInvalidLengthTypes 3198 } 3199 if postIndex > l { 3200 return io.ErrUnexpectedEOF 3201 } 3202 v := &BlockPart{} 3203 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3204 return err 3205 } 3206 m.Sum = &Message_BlockPart{v} 3207 iNdEx = postIndex 3208 case 6: 3209 if wireType != 2 { 3210 return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) 3211 } 3212 var msglen int 3213 for shift := uint(0); ; shift += 7 { 3214 if shift >= 64 { 3215 return ErrIntOverflowTypes 3216 } 3217 if iNdEx >= l { 3218 return io.ErrUnexpectedEOF 3219 } 3220 b := dAtA[iNdEx] 3221 iNdEx++ 3222 msglen |= int(b&0x7F) << shift 3223 if b < 0x80 { 3224 break 3225 } 3226 } 3227 if msglen < 0 { 3228 return ErrInvalidLengthTypes 3229 } 3230 postIndex := iNdEx + msglen 3231 if postIndex < 0 { 3232 return ErrInvalidLengthTypes 3233 } 3234 if postIndex > l { 3235 return io.ErrUnexpectedEOF 3236 } 3237 v := &Vote{} 3238 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3239 return err 3240 } 3241 m.Sum = &Message_Vote{v} 3242 iNdEx = postIndex 3243 case 7: 3244 if wireType != 2 { 3245 return fmt.Errorf("proto: wrong wireType = %d for field HasVote", wireType) 3246 } 3247 var msglen int 3248 for shift := uint(0); ; shift += 7 { 3249 if shift >= 64 { 3250 return ErrIntOverflowTypes 3251 } 3252 if iNdEx >= l { 3253 return io.ErrUnexpectedEOF 3254 } 3255 b := dAtA[iNdEx] 3256 iNdEx++ 3257 msglen |= int(b&0x7F) << shift 3258 if b < 0x80 { 3259 break 3260 } 3261 } 3262 if msglen < 0 { 3263 return ErrInvalidLengthTypes 3264 } 3265 postIndex := iNdEx + msglen 3266 if postIndex < 0 { 3267 return ErrInvalidLengthTypes 3268 } 3269 if postIndex > l { 3270 return io.ErrUnexpectedEOF 3271 } 3272 v := &HasVote{} 3273 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3274 return err 3275 } 3276 m.Sum = &Message_HasVote{v} 3277 iNdEx = postIndex 3278 case 8: 3279 if wireType != 2 { 3280 return fmt.Errorf("proto: wrong wireType = %d for field VoteSetMaj23", wireType) 3281 } 3282 var msglen int 3283 for shift := uint(0); ; shift += 7 { 3284 if shift >= 64 { 3285 return ErrIntOverflowTypes 3286 } 3287 if iNdEx >= l { 3288 return io.ErrUnexpectedEOF 3289 } 3290 b := dAtA[iNdEx] 3291 iNdEx++ 3292 msglen |= int(b&0x7F) << shift 3293 if b < 0x80 { 3294 break 3295 } 3296 } 3297 if msglen < 0 { 3298 return ErrInvalidLengthTypes 3299 } 3300 postIndex := iNdEx + msglen 3301 if postIndex < 0 { 3302 return ErrInvalidLengthTypes 3303 } 3304 if postIndex > l { 3305 return io.ErrUnexpectedEOF 3306 } 3307 v := &VoteSetMaj23{} 3308 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3309 return err 3310 } 3311 m.Sum = &Message_VoteSetMaj23{v} 3312 iNdEx = postIndex 3313 case 9: 3314 if wireType != 2 { 3315 return fmt.Errorf("proto: wrong wireType = %d for field VoteSetBits", wireType) 3316 } 3317 var msglen int 3318 for shift := uint(0); ; shift += 7 { 3319 if shift >= 64 { 3320 return ErrIntOverflowTypes 3321 } 3322 if iNdEx >= l { 3323 return io.ErrUnexpectedEOF 3324 } 3325 b := dAtA[iNdEx] 3326 iNdEx++ 3327 msglen |= int(b&0x7F) << shift 3328 if b < 0x80 { 3329 break 3330 } 3331 } 3332 if msglen < 0 { 3333 return ErrInvalidLengthTypes 3334 } 3335 postIndex := iNdEx + msglen 3336 if postIndex < 0 { 3337 return ErrInvalidLengthTypes 3338 } 3339 if postIndex > l { 3340 return io.ErrUnexpectedEOF 3341 } 3342 v := &VoteSetBits{} 3343 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3344 return err 3345 } 3346 m.Sum = &Message_VoteSetBits{v} 3347 iNdEx = postIndex 3348 default: 3349 iNdEx = preIndex 3350 skippy, err := skipTypes(dAtA[iNdEx:]) 3351 if err != nil { 3352 return err 3353 } 3354 if skippy < 0 { 3355 return ErrInvalidLengthTypes 3356 } 3357 if (iNdEx + skippy) < 0 { 3358 return ErrInvalidLengthTypes 3359 } 3360 if (iNdEx + skippy) > l { 3361 return io.ErrUnexpectedEOF 3362 } 3363 iNdEx += skippy 3364 } 3365 } 3366 3367 if iNdEx > l { 3368 return io.ErrUnexpectedEOF 3369 } 3370 return nil 3371 } 3372 func skipTypes(dAtA []byte) (n int, err error) { 3373 l := len(dAtA) 3374 iNdEx := 0 3375 depth := 0 3376 for iNdEx < l { 3377 var wire uint64 3378 for shift := uint(0); ; shift += 7 { 3379 if shift >= 64 { 3380 return 0, ErrIntOverflowTypes 3381 } 3382 if iNdEx >= l { 3383 return 0, io.ErrUnexpectedEOF 3384 } 3385 b := dAtA[iNdEx] 3386 iNdEx++ 3387 wire |= (uint64(b) & 0x7F) << shift 3388 if b < 0x80 { 3389 break 3390 } 3391 } 3392 wireType := int(wire & 0x7) 3393 switch wireType { 3394 case 0: 3395 for shift := uint(0); ; shift += 7 { 3396 if shift >= 64 { 3397 return 0, ErrIntOverflowTypes 3398 } 3399 if iNdEx >= l { 3400 return 0, io.ErrUnexpectedEOF 3401 } 3402 iNdEx++ 3403 if dAtA[iNdEx-1] < 0x80 { 3404 break 3405 } 3406 } 3407 case 1: 3408 iNdEx += 8 3409 case 2: 3410 var length int 3411 for shift := uint(0); ; shift += 7 { 3412 if shift >= 64 { 3413 return 0, ErrIntOverflowTypes 3414 } 3415 if iNdEx >= l { 3416 return 0, io.ErrUnexpectedEOF 3417 } 3418 b := dAtA[iNdEx] 3419 iNdEx++ 3420 length |= (int(b) & 0x7F) << shift 3421 if b < 0x80 { 3422 break 3423 } 3424 } 3425 if length < 0 { 3426 return 0, ErrInvalidLengthTypes 3427 } 3428 iNdEx += length 3429 case 3: 3430 depth++ 3431 case 4: 3432 if depth == 0 { 3433 return 0, ErrUnexpectedEndOfGroupTypes 3434 } 3435 depth-- 3436 case 5: 3437 iNdEx += 4 3438 default: 3439 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 3440 } 3441 if iNdEx < 0 { 3442 return 0, ErrInvalidLengthTypes 3443 } 3444 if depth == 0 { 3445 return iNdEx, nil 3446 } 3447 } 3448 return 0, io.ErrUnexpectedEOF 3449 } 3450 3451 var ( 3452 ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") 3453 ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") 3454 ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") 3455 )