github.com/Oyster-zx/tendermint@v0.34.24-fork/proto/tendermint/types/types.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: tendermint/types/types.proto 3 4 package types 5 6 import ( 7 fmt "fmt" 8 _ "github.com/gogo/protobuf/gogoproto" 9 proto "github.com/gogo/protobuf/proto" 10 _ "github.com/gogo/protobuf/types" 11 github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" 12 crypto "github.com/tendermint/tendermint/proto/tendermint/crypto" 13 version "github.com/tendermint/tendermint/proto/tendermint/version" 14 io "io" 15 math "math" 16 math_bits "math/bits" 17 time "time" 18 ) 19 20 // Reference imports to suppress errors if they are not otherwise used. 21 var _ = proto.Marshal 22 var _ = fmt.Errorf 23 var _ = math.Inf 24 var _ = time.Kitchen 25 26 // This is a compile-time assertion to ensure that this generated file 27 // is compatible with the proto package it is being compiled against. 28 // A compilation error at this line likely means your copy of the 29 // proto package needs to be updated. 30 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 31 32 // BlockIdFlag indicates which BlcokID the signature is for 33 type BlockIDFlag int32 34 35 const ( 36 BlockIDFlagUnknown BlockIDFlag = 0 37 BlockIDFlagAbsent BlockIDFlag = 1 38 BlockIDFlagCommit BlockIDFlag = 2 39 BlockIDFlagNil BlockIDFlag = 3 40 ) 41 42 var BlockIDFlag_name = map[int32]string{ 43 0: "BLOCK_ID_FLAG_UNKNOWN", 44 1: "BLOCK_ID_FLAG_ABSENT", 45 2: "BLOCK_ID_FLAG_COMMIT", 46 3: "BLOCK_ID_FLAG_NIL", 47 } 48 49 var BlockIDFlag_value = map[string]int32{ 50 "BLOCK_ID_FLAG_UNKNOWN": 0, 51 "BLOCK_ID_FLAG_ABSENT": 1, 52 "BLOCK_ID_FLAG_COMMIT": 2, 53 "BLOCK_ID_FLAG_NIL": 3, 54 } 55 56 func (x BlockIDFlag) String() string { 57 return proto.EnumName(BlockIDFlag_name, int32(x)) 58 } 59 60 func (BlockIDFlag) EnumDescriptor() ([]byte, []int) { 61 return fileDescriptor_d3a6e55e2345de56, []int{0} 62 } 63 64 // SignedMsgType is a type of signed message in the consensus. 65 type SignedMsgType int32 66 67 const ( 68 UnknownType SignedMsgType = 0 69 // Votes 70 PrevoteType SignedMsgType = 1 71 PrecommitType SignedMsgType = 2 72 // Proposals 73 ProposalType SignedMsgType = 32 74 ) 75 76 var SignedMsgType_name = map[int32]string{ 77 0: "SIGNED_MSG_TYPE_UNKNOWN", 78 1: "SIGNED_MSG_TYPE_PREVOTE", 79 2: "SIGNED_MSG_TYPE_PRECOMMIT", 80 32: "SIGNED_MSG_TYPE_PROPOSAL", 81 } 82 83 var SignedMsgType_value = map[string]int32{ 84 "SIGNED_MSG_TYPE_UNKNOWN": 0, 85 "SIGNED_MSG_TYPE_PREVOTE": 1, 86 "SIGNED_MSG_TYPE_PRECOMMIT": 2, 87 "SIGNED_MSG_TYPE_PROPOSAL": 32, 88 } 89 90 func (x SignedMsgType) String() string { 91 return proto.EnumName(SignedMsgType_name, int32(x)) 92 } 93 94 func (SignedMsgType) EnumDescriptor() ([]byte, []int) { 95 return fileDescriptor_d3a6e55e2345de56, []int{1} 96 } 97 98 // PartsetHeader 99 type PartSetHeader struct { 100 Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` 101 Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` 102 } 103 104 func (m *PartSetHeader) Reset() { *m = PartSetHeader{} } 105 func (m *PartSetHeader) String() string { return proto.CompactTextString(m) } 106 func (*PartSetHeader) ProtoMessage() {} 107 func (*PartSetHeader) Descriptor() ([]byte, []int) { 108 return fileDescriptor_d3a6e55e2345de56, []int{0} 109 } 110 func (m *PartSetHeader) XXX_Unmarshal(b []byte) error { 111 return m.Unmarshal(b) 112 } 113 func (m *PartSetHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 114 if deterministic { 115 return xxx_messageInfo_PartSetHeader.Marshal(b, m, deterministic) 116 } else { 117 b = b[:cap(b)] 118 n, err := m.MarshalToSizedBuffer(b) 119 if err != nil { 120 return nil, err 121 } 122 return b[:n], nil 123 } 124 } 125 func (m *PartSetHeader) XXX_Merge(src proto.Message) { 126 xxx_messageInfo_PartSetHeader.Merge(m, src) 127 } 128 func (m *PartSetHeader) XXX_Size() int { 129 return m.Size() 130 } 131 func (m *PartSetHeader) XXX_DiscardUnknown() { 132 xxx_messageInfo_PartSetHeader.DiscardUnknown(m) 133 } 134 135 var xxx_messageInfo_PartSetHeader proto.InternalMessageInfo 136 137 func (m *PartSetHeader) GetTotal() uint32 { 138 if m != nil { 139 return m.Total 140 } 141 return 0 142 } 143 144 func (m *PartSetHeader) GetHash() []byte { 145 if m != nil { 146 return m.Hash 147 } 148 return nil 149 } 150 151 type Part struct { 152 Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` 153 Bytes []byte `protobuf:"bytes,2,opt,name=bytes,proto3" json:"bytes,omitempty"` 154 Proof crypto.Proof `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof"` 155 } 156 157 func (m *Part) Reset() { *m = Part{} } 158 func (m *Part) String() string { return proto.CompactTextString(m) } 159 func (*Part) ProtoMessage() {} 160 func (*Part) Descriptor() ([]byte, []int) { 161 return fileDescriptor_d3a6e55e2345de56, []int{1} 162 } 163 func (m *Part) XXX_Unmarshal(b []byte) error { 164 return m.Unmarshal(b) 165 } 166 func (m *Part) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 167 if deterministic { 168 return xxx_messageInfo_Part.Marshal(b, m, deterministic) 169 } else { 170 b = b[:cap(b)] 171 n, err := m.MarshalToSizedBuffer(b) 172 if err != nil { 173 return nil, err 174 } 175 return b[:n], nil 176 } 177 } 178 func (m *Part) XXX_Merge(src proto.Message) { 179 xxx_messageInfo_Part.Merge(m, src) 180 } 181 func (m *Part) XXX_Size() int { 182 return m.Size() 183 } 184 func (m *Part) XXX_DiscardUnknown() { 185 xxx_messageInfo_Part.DiscardUnknown(m) 186 } 187 188 var xxx_messageInfo_Part proto.InternalMessageInfo 189 190 func (m *Part) GetIndex() uint32 { 191 if m != nil { 192 return m.Index 193 } 194 return 0 195 } 196 197 func (m *Part) GetBytes() []byte { 198 if m != nil { 199 return m.Bytes 200 } 201 return nil 202 } 203 204 func (m *Part) GetProof() crypto.Proof { 205 if m != nil { 206 return m.Proof 207 } 208 return crypto.Proof{} 209 } 210 211 // BlockID 212 type BlockID struct { 213 Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` 214 PartSetHeader PartSetHeader `protobuf:"bytes,2,opt,name=part_set_header,json=partSetHeader,proto3" json:"part_set_header"` 215 } 216 217 func (m *BlockID) Reset() { *m = BlockID{} } 218 func (m *BlockID) String() string { return proto.CompactTextString(m) } 219 func (*BlockID) ProtoMessage() {} 220 func (*BlockID) Descriptor() ([]byte, []int) { 221 return fileDescriptor_d3a6e55e2345de56, []int{2} 222 } 223 func (m *BlockID) XXX_Unmarshal(b []byte) error { 224 return m.Unmarshal(b) 225 } 226 func (m *BlockID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 227 if deterministic { 228 return xxx_messageInfo_BlockID.Marshal(b, m, deterministic) 229 } else { 230 b = b[:cap(b)] 231 n, err := m.MarshalToSizedBuffer(b) 232 if err != nil { 233 return nil, err 234 } 235 return b[:n], nil 236 } 237 } 238 func (m *BlockID) XXX_Merge(src proto.Message) { 239 xxx_messageInfo_BlockID.Merge(m, src) 240 } 241 func (m *BlockID) XXX_Size() int { 242 return m.Size() 243 } 244 func (m *BlockID) XXX_DiscardUnknown() { 245 xxx_messageInfo_BlockID.DiscardUnknown(m) 246 } 247 248 var xxx_messageInfo_BlockID proto.InternalMessageInfo 249 250 func (m *BlockID) GetHash() []byte { 251 if m != nil { 252 return m.Hash 253 } 254 return nil 255 } 256 257 func (m *BlockID) GetPartSetHeader() PartSetHeader { 258 if m != nil { 259 return m.PartSetHeader 260 } 261 return PartSetHeader{} 262 } 263 264 // Header defines the structure of a Tendermint block header. 265 type Header struct { 266 // basic block info 267 Version version.Consensus `protobuf:"bytes,1,opt,name=version,proto3" json:"version"` 268 ChainID string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` 269 Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` 270 Time time.Time `protobuf:"bytes,4,opt,name=time,proto3,stdtime" json:"time"` 271 // prev block info 272 LastBlockId BlockID `protobuf:"bytes,5,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"` 273 // hashes of block data 274 LastCommitHash []byte `protobuf:"bytes,6,opt,name=last_commit_hash,json=lastCommitHash,proto3" json:"last_commit_hash,omitempty"` 275 DataHash []byte `protobuf:"bytes,7,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"` 276 // hashes from the app output from the prev block 277 ValidatorsHash []byte `protobuf:"bytes,8,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"` 278 NextValidatorsHash []byte `protobuf:"bytes,9,opt,name=next_validators_hash,json=nextValidatorsHash,proto3" json:"next_validators_hash,omitempty"` 279 ConsensusHash []byte `protobuf:"bytes,10,opt,name=consensus_hash,json=consensusHash,proto3" json:"consensus_hash,omitempty"` 280 AppHash []byte `protobuf:"bytes,11,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` 281 LastResultsHash []byte `protobuf:"bytes,12,opt,name=last_results_hash,json=lastResultsHash,proto3" json:"last_results_hash,omitempty"` 282 // consensus info 283 EvidenceHash []byte `protobuf:"bytes,13,opt,name=evidence_hash,json=evidenceHash,proto3" json:"evidence_hash,omitempty"` 284 ProposerAddress []byte `protobuf:"bytes,14,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` 285 } 286 287 func (m *Header) Reset() { *m = Header{} } 288 func (m *Header) String() string { return proto.CompactTextString(m) } 289 func (*Header) ProtoMessage() {} 290 func (*Header) Descriptor() ([]byte, []int) { 291 return fileDescriptor_d3a6e55e2345de56, []int{3} 292 } 293 func (m *Header) XXX_Unmarshal(b []byte) error { 294 return m.Unmarshal(b) 295 } 296 func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 297 if deterministic { 298 return xxx_messageInfo_Header.Marshal(b, m, deterministic) 299 } else { 300 b = b[:cap(b)] 301 n, err := m.MarshalToSizedBuffer(b) 302 if err != nil { 303 return nil, err 304 } 305 return b[:n], nil 306 } 307 } 308 func (m *Header) XXX_Merge(src proto.Message) { 309 xxx_messageInfo_Header.Merge(m, src) 310 } 311 func (m *Header) XXX_Size() int { 312 return m.Size() 313 } 314 func (m *Header) XXX_DiscardUnknown() { 315 xxx_messageInfo_Header.DiscardUnknown(m) 316 } 317 318 var xxx_messageInfo_Header proto.InternalMessageInfo 319 320 func (m *Header) GetVersion() version.Consensus { 321 if m != nil { 322 return m.Version 323 } 324 return version.Consensus{} 325 } 326 327 func (m *Header) GetChainID() string { 328 if m != nil { 329 return m.ChainID 330 } 331 return "" 332 } 333 334 func (m *Header) GetHeight() int64 { 335 if m != nil { 336 return m.Height 337 } 338 return 0 339 } 340 341 func (m *Header) GetTime() time.Time { 342 if m != nil { 343 return m.Time 344 } 345 return time.Time{} 346 } 347 348 func (m *Header) GetLastBlockId() BlockID { 349 if m != nil { 350 return m.LastBlockId 351 } 352 return BlockID{} 353 } 354 355 func (m *Header) GetLastCommitHash() []byte { 356 if m != nil { 357 return m.LastCommitHash 358 } 359 return nil 360 } 361 362 func (m *Header) GetDataHash() []byte { 363 if m != nil { 364 return m.DataHash 365 } 366 return nil 367 } 368 369 func (m *Header) GetValidatorsHash() []byte { 370 if m != nil { 371 return m.ValidatorsHash 372 } 373 return nil 374 } 375 376 func (m *Header) GetNextValidatorsHash() []byte { 377 if m != nil { 378 return m.NextValidatorsHash 379 } 380 return nil 381 } 382 383 func (m *Header) GetConsensusHash() []byte { 384 if m != nil { 385 return m.ConsensusHash 386 } 387 return nil 388 } 389 390 func (m *Header) GetAppHash() []byte { 391 if m != nil { 392 return m.AppHash 393 } 394 return nil 395 } 396 397 func (m *Header) GetLastResultsHash() []byte { 398 if m != nil { 399 return m.LastResultsHash 400 } 401 return nil 402 } 403 404 func (m *Header) GetEvidenceHash() []byte { 405 if m != nil { 406 return m.EvidenceHash 407 } 408 return nil 409 } 410 411 func (m *Header) GetProposerAddress() []byte { 412 if m != nil { 413 return m.ProposerAddress 414 } 415 return nil 416 } 417 418 // Data contains the set of transactions included in the block 419 type Data struct { 420 // Txs that will be applied by state @ block.Height+1. 421 // NOTE: not all txs here are valid. We're just agreeing on the order first. 422 // This means that block.AppHash does not include these txs. 423 Txs [][]byte `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` 424 } 425 426 func (m *Data) Reset() { *m = Data{} } 427 func (m *Data) String() string { return proto.CompactTextString(m) } 428 func (*Data) ProtoMessage() {} 429 func (*Data) Descriptor() ([]byte, []int) { 430 return fileDescriptor_d3a6e55e2345de56, []int{4} 431 } 432 func (m *Data) XXX_Unmarshal(b []byte) error { 433 return m.Unmarshal(b) 434 } 435 func (m *Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 436 if deterministic { 437 return xxx_messageInfo_Data.Marshal(b, m, deterministic) 438 } else { 439 b = b[:cap(b)] 440 n, err := m.MarshalToSizedBuffer(b) 441 if err != nil { 442 return nil, err 443 } 444 return b[:n], nil 445 } 446 } 447 func (m *Data) XXX_Merge(src proto.Message) { 448 xxx_messageInfo_Data.Merge(m, src) 449 } 450 func (m *Data) XXX_Size() int { 451 return m.Size() 452 } 453 func (m *Data) XXX_DiscardUnknown() { 454 xxx_messageInfo_Data.DiscardUnknown(m) 455 } 456 457 var xxx_messageInfo_Data proto.InternalMessageInfo 458 459 func (m *Data) GetTxs() [][]byte { 460 if m != nil { 461 return m.Txs 462 } 463 return nil 464 } 465 466 // Vote represents a prevote, precommit, or commit vote from validators for 467 // consensus. 468 type Vote struct { 469 Type SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.types.SignedMsgType" json:"type,omitempty"` 470 Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` 471 Round int32 `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"` 472 BlockID BlockID `protobuf:"bytes,4,opt,name=block_id,json=blockId,proto3" json:"block_id"` 473 Timestamp time.Time `protobuf:"bytes,5,opt,name=timestamp,proto3,stdtime" json:"timestamp"` 474 ValidatorAddress []byte `protobuf:"bytes,6,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` 475 ValidatorIndex int32 `protobuf:"varint,7,opt,name=validator_index,json=validatorIndex,proto3" json:"validator_index,omitempty"` 476 Signature []byte `protobuf:"bytes,8,opt,name=signature,proto3" json:"signature,omitempty"` 477 } 478 479 func (m *Vote) Reset() { *m = Vote{} } 480 func (m *Vote) String() string { return proto.CompactTextString(m) } 481 func (*Vote) ProtoMessage() {} 482 func (*Vote) Descriptor() ([]byte, []int) { 483 return fileDescriptor_d3a6e55e2345de56, []int{5} 484 } 485 func (m *Vote) XXX_Unmarshal(b []byte) error { 486 return m.Unmarshal(b) 487 } 488 func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 489 if deterministic { 490 return xxx_messageInfo_Vote.Marshal(b, m, deterministic) 491 } else { 492 b = b[:cap(b)] 493 n, err := m.MarshalToSizedBuffer(b) 494 if err != nil { 495 return nil, err 496 } 497 return b[:n], nil 498 } 499 } 500 func (m *Vote) XXX_Merge(src proto.Message) { 501 xxx_messageInfo_Vote.Merge(m, src) 502 } 503 func (m *Vote) XXX_Size() int { 504 return m.Size() 505 } 506 func (m *Vote) XXX_DiscardUnknown() { 507 xxx_messageInfo_Vote.DiscardUnknown(m) 508 } 509 510 var xxx_messageInfo_Vote proto.InternalMessageInfo 511 512 func (m *Vote) GetType() SignedMsgType { 513 if m != nil { 514 return m.Type 515 } 516 return UnknownType 517 } 518 519 func (m *Vote) GetHeight() int64 { 520 if m != nil { 521 return m.Height 522 } 523 return 0 524 } 525 526 func (m *Vote) GetRound() int32 { 527 if m != nil { 528 return m.Round 529 } 530 return 0 531 } 532 533 func (m *Vote) GetBlockID() BlockID { 534 if m != nil { 535 return m.BlockID 536 } 537 return BlockID{} 538 } 539 540 func (m *Vote) GetTimestamp() time.Time { 541 if m != nil { 542 return m.Timestamp 543 } 544 return time.Time{} 545 } 546 547 func (m *Vote) GetValidatorAddress() []byte { 548 if m != nil { 549 return m.ValidatorAddress 550 } 551 return nil 552 } 553 554 func (m *Vote) GetValidatorIndex() int32 { 555 if m != nil { 556 return m.ValidatorIndex 557 } 558 return 0 559 } 560 561 func (m *Vote) GetSignature() []byte { 562 if m != nil { 563 return m.Signature 564 } 565 return nil 566 } 567 568 // Commit contains the evidence that a block was committed by a set of validators. 569 type Commit struct { 570 Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` 571 Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` 572 BlockID BlockID `protobuf:"bytes,3,opt,name=block_id,json=blockId,proto3" json:"block_id"` 573 Signatures []CommitSig `protobuf:"bytes,4,rep,name=signatures,proto3" json:"signatures"` 574 } 575 576 func (m *Commit) Reset() { *m = Commit{} } 577 func (m *Commit) String() string { return proto.CompactTextString(m) } 578 func (*Commit) ProtoMessage() {} 579 func (*Commit) Descriptor() ([]byte, []int) { 580 return fileDescriptor_d3a6e55e2345de56, []int{6} 581 } 582 func (m *Commit) XXX_Unmarshal(b []byte) error { 583 return m.Unmarshal(b) 584 } 585 func (m *Commit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 586 if deterministic { 587 return xxx_messageInfo_Commit.Marshal(b, m, deterministic) 588 } else { 589 b = b[:cap(b)] 590 n, err := m.MarshalToSizedBuffer(b) 591 if err != nil { 592 return nil, err 593 } 594 return b[:n], nil 595 } 596 } 597 func (m *Commit) XXX_Merge(src proto.Message) { 598 xxx_messageInfo_Commit.Merge(m, src) 599 } 600 func (m *Commit) XXX_Size() int { 601 return m.Size() 602 } 603 func (m *Commit) XXX_DiscardUnknown() { 604 xxx_messageInfo_Commit.DiscardUnknown(m) 605 } 606 607 var xxx_messageInfo_Commit proto.InternalMessageInfo 608 609 func (m *Commit) GetHeight() int64 { 610 if m != nil { 611 return m.Height 612 } 613 return 0 614 } 615 616 func (m *Commit) GetRound() int32 { 617 if m != nil { 618 return m.Round 619 } 620 return 0 621 } 622 623 func (m *Commit) GetBlockID() BlockID { 624 if m != nil { 625 return m.BlockID 626 } 627 return BlockID{} 628 } 629 630 func (m *Commit) GetSignatures() []CommitSig { 631 if m != nil { 632 return m.Signatures 633 } 634 return nil 635 } 636 637 // CommitSig is a part of the Vote included in a Commit. 638 type CommitSig struct { 639 BlockIdFlag BlockIDFlag `protobuf:"varint,1,opt,name=block_id_flag,json=blockIdFlag,proto3,enum=tendermint.types.BlockIDFlag" json:"block_id_flag,omitempty"` 640 ValidatorAddress []byte `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` 641 Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,proto3,stdtime" json:"timestamp"` 642 Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` 643 } 644 645 func (m *CommitSig) Reset() { *m = CommitSig{} } 646 func (m *CommitSig) String() string { return proto.CompactTextString(m) } 647 func (*CommitSig) ProtoMessage() {} 648 func (*CommitSig) Descriptor() ([]byte, []int) { 649 return fileDescriptor_d3a6e55e2345de56, []int{7} 650 } 651 func (m *CommitSig) XXX_Unmarshal(b []byte) error { 652 return m.Unmarshal(b) 653 } 654 func (m *CommitSig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 655 if deterministic { 656 return xxx_messageInfo_CommitSig.Marshal(b, m, deterministic) 657 } else { 658 b = b[:cap(b)] 659 n, err := m.MarshalToSizedBuffer(b) 660 if err != nil { 661 return nil, err 662 } 663 return b[:n], nil 664 } 665 } 666 func (m *CommitSig) XXX_Merge(src proto.Message) { 667 xxx_messageInfo_CommitSig.Merge(m, src) 668 } 669 func (m *CommitSig) XXX_Size() int { 670 return m.Size() 671 } 672 func (m *CommitSig) XXX_DiscardUnknown() { 673 xxx_messageInfo_CommitSig.DiscardUnknown(m) 674 } 675 676 var xxx_messageInfo_CommitSig proto.InternalMessageInfo 677 678 func (m *CommitSig) GetBlockIdFlag() BlockIDFlag { 679 if m != nil { 680 return m.BlockIdFlag 681 } 682 return BlockIDFlagUnknown 683 } 684 685 func (m *CommitSig) GetValidatorAddress() []byte { 686 if m != nil { 687 return m.ValidatorAddress 688 } 689 return nil 690 } 691 692 func (m *CommitSig) GetTimestamp() time.Time { 693 if m != nil { 694 return m.Timestamp 695 } 696 return time.Time{} 697 } 698 699 func (m *CommitSig) GetSignature() []byte { 700 if m != nil { 701 return m.Signature 702 } 703 return nil 704 } 705 706 type Proposal struct { 707 Type SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.types.SignedMsgType" json:"type,omitempty"` 708 Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` 709 Round int32 `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"` 710 PolRound int32 `protobuf:"varint,4,opt,name=pol_round,json=polRound,proto3" json:"pol_round,omitempty"` 711 BlockID BlockID `protobuf:"bytes,5,opt,name=block_id,json=blockId,proto3" json:"block_id"` 712 Timestamp time.Time `protobuf:"bytes,6,opt,name=timestamp,proto3,stdtime" json:"timestamp"` 713 Signature []byte `protobuf:"bytes,7,opt,name=signature,proto3" json:"signature,omitempty"` 714 } 715 716 func (m *Proposal) Reset() { *m = Proposal{} } 717 func (m *Proposal) String() string { return proto.CompactTextString(m) } 718 func (*Proposal) ProtoMessage() {} 719 func (*Proposal) Descriptor() ([]byte, []int) { 720 return fileDescriptor_d3a6e55e2345de56, []int{8} 721 } 722 func (m *Proposal) XXX_Unmarshal(b []byte) error { 723 return m.Unmarshal(b) 724 } 725 func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 726 if deterministic { 727 return xxx_messageInfo_Proposal.Marshal(b, m, deterministic) 728 } else { 729 b = b[:cap(b)] 730 n, err := m.MarshalToSizedBuffer(b) 731 if err != nil { 732 return nil, err 733 } 734 return b[:n], nil 735 } 736 } 737 func (m *Proposal) XXX_Merge(src proto.Message) { 738 xxx_messageInfo_Proposal.Merge(m, src) 739 } 740 func (m *Proposal) XXX_Size() int { 741 return m.Size() 742 } 743 func (m *Proposal) XXX_DiscardUnknown() { 744 xxx_messageInfo_Proposal.DiscardUnknown(m) 745 } 746 747 var xxx_messageInfo_Proposal proto.InternalMessageInfo 748 749 func (m *Proposal) GetType() SignedMsgType { 750 if m != nil { 751 return m.Type 752 } 753 return UnknownType 754 } 755 756 func (m *Proposal) GetHeight() int64 { 757 if m != nil { 758 return m.Height 759 } 760 return 0 761 } 762 763 func (m *Proposal) GetRound() int32 { 764 if m != nil { 765 return m.Round 766 } 767 return 0 768 } 769 770 func (m *Proposal) GetPolRound() int32 { 771 if m != nil { 772 return m.PolRound 773 } 774 return 0 775 } 776 777 func (m *Proposal) GetBlockID() BlockID { 778 if m != nil { 779 return m.BlockID 780 } 781 return BlockID{} 782 } 783 784 func (m *Proposal) GetTimestamp() time.Time { 785 if m != nil { 786 return m.Timestamp 787 } 788 return time.Time{} 789 } 790 791 func (m *Proposal) GetSignature() []byte { 792 if m != nil { 793 return m.Signature 794 } 795 return nil 796 } 797 798 type SignedHeader struct { 799 Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` 800 Commit *Commit `protobuf:"bytes,2,opt,name=commit,proto3" json:"commit,omitempty"` 801 } 802 803 func (m *SignedHeader) Reset() { *m = SignedHeader{} } 804 func (m *SignedHeader) String() string { return proto.CompactTextString(m) } 805 func (*SignedHeader) ProtoMessage() {} 806 func (*SignedHeader) Descriptor() ([]byte, []int) { 807 return fileDescriptor_d3a6e55e2345de56, []int{9} 808 } 809 func (m *SignedHeader) XXX_Unmarshal(b []byte) error { 810 return m.Unmarshal(b) 811 } 812 func (m *SignedHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 813 if deterministic { 814 return xxx_messageInfo_SignedHeader.Marshal(b, m, deterministic) 815 } else { 816 b = b[:cap(b)] 817 n, err := m.MarshalToSizedBuffer(b) 818 if err != nil { 819 return nil, err 820 } 821 return b[:n], nil 822 } 823 } 824 func (m *SignedHeader) XXX_Merge(src proto.Message) { 825 xxx_messageInfo_SignedHeader.Merge(m, src) 826 } 827 func (m *SignedHeader) XXX_Size() int { 828 return m.Size() 829 } 830 func (m *SignedHeader) XXX_DiscardUnknown() { 831 xxx_messageInfo_SignedHeader.DiscardUnknown(m) 832 } 833 834 var xxx_messageInfo_SignedHeader proto.InternalMessageInfo 835 836 func (m *SignedHeader) GetHeader() *Header { 837 if m != nil { 838 return m.Header 839 } 840 return nil 841 } 842 843 func (m *SignedHeader) GetCommit() *Commit { 844 if m != nil { 845 return m.Commit 846 } 847 return nil 848 } 849 850 type LightBlock struct { 851 SignedHeader *SignedHeader `protobuf:"bytes,1,opt,name=signed_header,json=signedHeader,proto3" json:"signed_header,omitempty"` 852 ValidatorSet *ValidatorSet `protobuf:"bytes,2,opt,name=validator_set,json=validatorSet,proto3" json:"validator_set,omitempty"` 853 } 854 855 func (m *LightBlock) Reset() { *m = LightBlock{} } 856 func (m *LightBlock) String() string { return proto.CompactTextString(m) } 857 func (*LightBlock) ProtoMessage() {} 858 func (*LightBlock) Descriptor() ([]byte, []int) { 859 return fileDescriptor_d3a6e55e2345de56, []int{10} 860 } 861 func (m *LightBlock) XXX_Unmarshal(b []byte) error { 862 return m.Unmarshal(b) 863 } 864 func (m *LightBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 865 if deterministic { 866 return xxx_messageInfo_LightBlock.Marshal(b, m, deterministic) 867 } else { 868 b = b[:cap(b)] 869 n, err := m.MarshalToSizedBuffer(b) 870 if err != nil { 871 return nil, err 872 } 873 return b[:n], nil 874 } 875 } 876 func (m *LightBlock) XXX_Merge(src proto.Message) { 877 xxx_messageInfo_LightBlock.Merge(m, src) 878 } 879 func (m *LightBlock) XXX_Size() int { 880 return m.Size() 881 } 882 func (m *LightBlock) XXX_DiscardUnknown() { 883 xxx_messageInfo_LightBlock.DiscardUnknown(m) 884 } 885 886 var xxx_messageInfo_LightBlock proto.InternalMessageInfo 887 888 func (m *LightBlock) GetSignedHeader() *SignedHeader { 889 if m != nil { 890 return m.SignedHeader 891 } 892 return nil 893 } 894 895 func (m *LightBlock) GetValidatorSet() *ValidatorSet { 896 if m != nil { 897 return m.ValidatorSet 898 } 899 return nil 900 } 901 902 type BlockMeta struct { 903 BlockID BlockID `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id"` 904 BlockSize int64 `protobuf:"varint,2,opt,name=block_size,json=blockSize,proto3" json:"block_size,omitempty"` 905 Header Header `protobuf:"bytes,3,opt,name=header,proto3" json:"header"` 906 NumTxs int64 `protobuf:"varint,4,opt,name=num_txs,json=numTxs,proto3" json:"num_txs,omitempty"` 907 } 908 909 func (m *BlockMeta) Reset() { *m = BlockMeta{} } 910 func (m *BlockMeta) String() string { return proto.CompactTextString(m) } 911 func (*BlockMeta) ProtoMessage() {} 912 func (*BlockMeta) Descriptor() ([]byte, []int) { 913 return fileDescriptor_d3a6e55e2345de56, []int{11} 914 } 915 func (m *BlockMeta) XXX_Unmarshal(b []byte) error { 916 return m.Unmarshal(b) 917 } 918 func (m *BlockMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 919 if deterministic { 920 return xxx_messageInfo_BlockMeta.Marshal(b, m, deterministic) 921 } else { 922 b = b[:cap(b)] 923 n, err := m.MarshalToSizedBuffer(b) 924 if err != nil { 925 return nil, err 926 } 927 return b[:n], nil 928 } 929 } 930 func (m *BlockMeta) XXX_Merge(src proto.Message) { 931 xxx_messageInfo_BlockMeta.Merge(m, src) 932 } 933 func (m *BlockMeta) XXX_Size() int { 934 return m.Size() 935 } 936 func (m *BlockMeta) XXX_DiscardUnknown() { 937 xxx_messageInfo_BlockMeta.DiscardUnknown(m) 938 } 939 940 var xxx_messageInfo_BlockMeta proto.InternalMessageInfo 941 942 func (m *BlockMeta) GetBlockID() BlockID { 943 if m != nil { 944 return m.BlockID 945 } 946 return BlockID{} 947 } 948 949 func (m *BlockMeta) GetBlockSize() int64 { 950 if m != nil { 951 return m.BlockSize 952 } 953 return 0 954 } 955 956 func (m *BlockMeta) GetHeader() Header { 957 if m != nil { 958 return m.Header 959 } 960 return Header{} 961 } 962 963 func (m *BlockMeta) GetNumTxs() int64 { 964 if m != nil { 965 return m.NumTxs 966 } 967 return 0 968 } 969 970 // TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. 971 type TxProof struct { 972 RootHash []byte `protobuf:"bytes,1,opt,name=root_hash,json=rootHash,proto3" json:"root_hash,omitempty"` 973 Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` 974 Proof *crypto.Proof `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` 975 } 976 977 func (m *TxProof) Reset() { *m = TxProof{} } 978 func (m *TxProof) String() string { return proto.CompactTextString(m) } 979 func (*TxProof) ProtoMessage() {} 980 func (*TxProof) Descriptor() ([]byte, []int) { 981 return fileDescriptor_d3a6e55e2345de56, []int{12} 982 } 983 func (m *TxProof) XXX_Unmarshal(b []byte) error { 984 return m.Unmarshal(b) 985 } 986 func (m *TxProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 987 if deterministic { 988 return xxx_messageInfo_TxProof.Marshal(b, m, deterministic) 989 } else { 990 b = b[:cap(b)] 991 n, err := m.MarshalToSizedBuffer(b) 992 if err != nil { 993 return nil, err 994 } 995 return b[:n], nil 996 } 997 } 998 func (m *TxProof) XXX_Merge(src proto.Message) { 999 xxx_messageInfo_TxProof.Merge(m, src) 1000 } 1001 func (m *TxProof) XXX_Size() int { 1002 return m.Size() 1003 } 1004 func (m *TxProof) XXX_DiscardUnknown() { 1005 xxx_messageInfo_TxProof.DiscardUnknown(m) 1006 } 1007 1008 var xxx_messageInfo_TxProof proto.InternalMessageInfo 1009 1010 func (m *TxProof) GetRootHash() []byte { 1011 if m != nil { 1012 return m.RootHash 1013 } 1014 return nil 1015 } 1016 1017 func (m *TxProof) GetData() []byte { 1018 if m != nil { 1019 return m.Data 1020 } 1021 return nil 1022 } 1023 1024 func (m *TxProof) GetProof() *crypto.Proof { 1025 if m != nil { 1026 return m.Proof 1027 } 1028 return nil 1029 } 1030 1031 func init() { 1032 proto.RegisterEnum("tendermint.types.BlockIDFlag", BlockIDFlag_name, BlockIDFlag_value) 1033 proto.RegisterEnum("tendermint.types.SignedMsgType", SignedMsgType_name, SignedMsgType_value) 1034 proto.RegisterType((*PartSetHeader)(nil), "tendermint.types.PartSetHeader") 1035 proto.RegisterType((*Part)(nil), "tendermint.types.Part") 1036 proto.RegisterType((*BlockID)(nil), "tendermint.types.BlockID") 1037 proto.RegisterType((*Header)(nil), "tendermint.types.Header") 1038 proto.RegisterType((*Data)(nil), "tendermint.types.Data") 1039 proto.RegisterType((*Vote)(nil), "tendermint.types.Vote") 1040 proto.RegisterType((*Commit)(nil), "tendermint.types.Commit") 1041 proto.RegisterType((*CommitSig)(nil), "tendermint.types.CommitSig") 1042 proto.RegisterType((*Proposal)(nil), "tendermint.types.Proposal") 1043 proto.RegisterType((*SignedHeader)(nil), "tendermint.types.SignedHeader") 1044 proto.RegisterType((*LightBlock)(nil), "tendermint.types.LightBlock") 1045 proto.RegisterType((*BlockMeta)(nil), "tendermint.types.BlockMeta") 1046 proto.RegisterType((*TxProof)(nil), "tendermint.types.TxProof") 1047 } 1048 1049 func init() { proto.RegisterFile("tendermint/types/types.proto", fileDescriptor_d3a6e55e2345de56) } 1050 1051 var fileDescriptor_d3a6e55e2345de56 = []byte{ 1052 // 1314 bytes of a gzipped FileDescriptorProto 1053 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4f, 0x6f, 0x1b, 0x45, 1054 0x14, 0xcf, 0xda, 0x9b, 0xd8, 0x7e, 0xb6, 0x13, 0x67, 0x95, 0xb6, 0xae, 0xdb, 0x38, 0x2b, 0x23, 1055 0x20, 0x2d, 0x68, 0x53, 0x52, 0xc4, 0x9f, 0x03, 0x07, 0xdb, 0x49, 0x5b, 0xab, 0x89, 0x63, 0xd6, 1056 0x6e, 0x11, 0x5c, 0x56, 0x6b, 0xef, 0xd4, 0x5e, 0xba, 0xde, 0x59, 0xed, 0x8c, 0x43, 0xd2, 0x4f, 1057 0x80, 0x72, 0xea, 0x89, 0x5b, 0x4e, 0x70, 0xe0, 0xce, 0x17, 0x40, 0x9c, 0x7a, 0xec, 0x0d, 0x2e, 1058 0x14, 0x94, 0x4a, 0x88, 0x8f, 0x81, 0xe6, 0x8f, 0xd7, 0xeb, 0x38, 0x86, 0xaa, 0xaa, 0xb8, 0x58, 1059 0x3b, 0xef, 0xfd, 0xde, 0xcc, 0x7b, 0xbf, 0xf7, 0x9b, 0x3f, 0x86, 0xeb, 0x14, 0xf9, 0x0e, 0x0a, 1060 0x87, 0xae, 0x4f, 0xb7, 0xe8, 0x71, 0x80, 0x88, 0xf8, 0x35, 0x82, 0x10, 0x53, 0xac, 0x15, 0x26, 1061 0x5e, 0x83, 0xdb, 0x4b, 0x6b, 0x7d, 0xdc, 0xc7, 0xdc, 0xb9, 0xc5, 0xbe, 0x04, 0xae, 0xb4, 0xd1, 1062 0xc7, 0xb8, 0xef, 0xa1, 0x2d, 0x3e, 0xea, 0x8e, 0x1e, 0x6d, 0x51, 0x77, 0x88, 0x08, 0xb5, 0x87, 1063 0x81, 0x04, 0xac, 0xc7, 0x96, 0xe9, 0x85, 0xc7, 0x01, 0xc5, 0x0c, 0x8b, 0x1f, 0x49, 0x77, 0x39, 1064 0xe6, 0x3e, 0x44, 0x21, 0x71, 0xb1, 0x1f, 0xcf, 0xa3, 0xa4, 0xcf, 0x64, 0x79, 0x68, 0x7b, 0xae, 1065 0x63, 0x53, 0x1c, 0x0a, 0x44, 0xe5, 0x53, 0xc8, 0xb7, 0xec, 0x90, 0xb6, 0x11, 0xbd, 0x87, 0x6c, 1066 0x07, 0x85, 0xda, 0x1a, 0x2c, 0x52, 0x4c, 0x6d, 0xaf, 0xa8, 0xe8, 0xca, 0x66, 0xde, 0x14, 0x03, 1067 0x4d, 0x03, 0x75, 0x60, 0x93, 0x41, 0x31, 0xa1, 0x2b, 0x9b, 0x39, 0x93, 0x7f, 0x57, 0x06, 0xa0, 1068 0xb2, 0x50, 0x16, 0xe1, 0xfa, 0x0e, 0x3a, 0x1a, 0x47, 0xf0, 0x01, 0xb3, 0x76, 0x8f, 0x29, 0x22, 1069 0x32, 0x44, 0x0c, 0xb4, 0x0f, 0x61, 0x91, 0xe7, 0x5f, 0x4c, 0xea, 0xca, 0x66, 0x76, 0xbb, 0x68, 1070 0xc4, 0x88, 0x12, 0xf5, 0x19, 0x2d, 0xe6, 0xaf, 0xa9, 0xcf, 0x5e, 0x6c, 0x2c, 0x98, 0x02, 0x5c, 1071 0xf1, 0x20, 0x55, 0xf3, 0x70, 0xef, 0x71, 0x63, 0x27, 0x4a, 0x44, 0x99, 0x24, 0xa2, 0xed, 0xc3, 1072 0x4a, 0x60, 0x87, 0xd4, 0x22, 0x88, 0x5a, 0x03, 0x5e, 0x05, 0x5f, 0x34, 0xbb, 0xbd, 0x61, 0x9c, 1073 0xef, 0x83, 0x31, 0x55, 0xac, 0x5c, 0x25, 0x1f, 0xc4, 0x8d, 0x95, 0xbf, 0x54, 0x58, 0x92, 0x64, 1074 0x7c, 0x06, 0x29, 0x49, 0x2b, 0x5f, 0x30, 0xbb, 0xbd, 0x1e, 0x9f, 0x51, 0xba, 0x8c, 0x3a, 0xf6, 1075 0x09, 0xf2, 0xc9, 0x88, 0xc8, 0xf9, 0xc6, 0x31, 0xda, 0x3b, 0x90, 0xee, 0x0d, 0x6c, 0xd7, 0xb7, 1076 0x5c, 0x87, 0x67, 0x94, 0xa9, 0x65, 0xcf, 0x5e, 0x6c, 0xa4, 0xea, 0xcc, 0xd6, 0xd8, 0x31, 0x53, 1077 0xdc, 0xd9, 0x70, 0xb4, 0xcb, 0xb0, 0x34, 0x40, 0x6e, 0x7f, 0x40, 0x39, 0x2d, 0x49, 0x53, 0x8e, 1078 0xb4, 0x4f, 0x40, 0x65, 0x82, 0x28, 0xaa, 0x7c, 0xed, 0x92, 0x21, 0xd4, 0x62, 0x8c, 0xd5, 0x62, 1079 0x74, 0xc6, 0x6a, 0xa9, 0xa5, 0xd9, 0xc2, 0x4f, 0xff, 0xd8, 0x50, 0x4c, 0x1e, 0xa1, 0xd5, 0x21, 1080 0xef, 0xd9, 0x84, 0x5a, 0x5d, 0x46, 0x1b, 0x5b, 0x7e, 0x91, 0x4f, 0x71, 0x75, 0x96, 0x10, 0x49, 1081 0xac, 0x4c, 0x3d, 0xcb, 0xa2, 0x84, 0xc9, 0xd1, 0x36, 0xa1, 0xc0, 0x27, 0xe9, 0xe1, 0xe1, 0xd0, 1082 0xa5, 0x16, 0xe7, 0x7d, 0x89, 0xf3, 0xbe, 0xcc, 0xec, 0x75, 0x6e, 0xbe, 0xc7, 0x3a, 0x70, 0x0d, 1083 0x32, 0x8e, 0x4d, 0x6d, 0x01, 0x49, 0x71, 0x48, 0x9a, 0x19, 0xb8, 0xf3, 0x5d, 0x58, 0x89, 0x54, 1084 0x47, 0x04, 0x24, 0x2d, 0x66, 0x99, 0x98, 0x39, 0xf0, 0x16, 0xac, 0xf9, 0xe8, 0x88, 0x5a, 0xe7, 1085 0xd1, 0x19, 0x8e, 0xd6, 0x98, 0xef, 0xe1, 0x74, 0xc4, 0xdb, 0xb0, 0xdc, 0x1b, 0x93, 0x2f, 0xb0, 1086 0xc0, 0xb1, 0xf9, 0xc8, 0xca, 0x61, 0x57, 0x21, 0x6d, 0x07, 0x81, 0x00, 0x64, 0x39, 0x20, 0x65, 1087 0x07, 0x01, 0x77, 0xdd, 0x84, 0x55, 0x5e, 0x63, 0x88, 0xc8, 0xc8, 0xa3, 0x72, 0x92, 0x1c, 0xc7, 1088 0xac, 0x30, 0x87, 0x29, 0xec, 0x1c, 0xfb, 0x16, 0xe4, 0xd1, 0xa1, 0xeb, 0x20, 0xbf, 0x87, 0x04, 1089 0x2e, 0xcf, 0x71, 0xb9, 0xb1, 0x91, 0x83, 0x6e, 0x40, 0x21, 0x08, 0x71, 0x80, 0x09, 0x0a, 0x2d, 1090 0xdb, 0x71, 0x42, 0x44, 0x48, 0x71, 0x59, 0xcc, 0x37, 0xb6, 0x57, 0x85, 0xb9, 0x52, 0x04, 0x75, 1091 0xc7, 0xa6, 0xb6, 0x56, 0x80, 0x24, 0x3d, 0x22, 0x45, 0x45, 0x4f, 0x6e, 0xe6, 0x4c, 0xf6, 0x59, 1092 0xf9, 0x3b, 0x01, 0xea, 0x43, 0x4c, 0x91, 0x76, 0x1b, 0x54, 0xd6, 0x26, 0xae, 0xbe, 0xe5, 0x8b, 1093 0xf4, 0xdc, 0x76, 0xfb, 0x3e, 0x72, 0xf6, 0x49, 0xbf, 0x73, 0x1c, 0x20, 0x93, 0x83, 0x63, 0x72, 1094 0x4a, 0x4c, 0xc9, 0x69, 0x0d, 0x16, 0x43, 0x3c, 0xf2, 0x1d, 0xae, 0xb2, 0x45, 0x53, 0x0c, 0xb4, 1095 0x5d, 0x48, 0x47, 0x2a, 0x51, 0xff, 0x4b, 0x25, 0x2b, 0x4c, 0x25, 0x4c, 0xc3, 0xd2, 0x60, 0xa6, 1096 0xba, 0x52, 0x2c, 0x35, 0xc8, 0x44, 0x87, 0x97, 0x54, 0xdb, 0xab, 0x09, 0x76, 0x12, 0xa6, 0xbd, 1097 0x07, 0xab, 0x51, 0xef, 0x23, 0xf2, 0x84, 0xe2, 0x0a, 0x91, 0x43, 0xb2, 0x37, 0x25, 0x2b, 0x4b, 1098 0x1c, 0x40, 0x29, 0x5e, 0xd7, 0x44, 0x56, 0x0d, 0x7e, 0x12, 0x5d, 0x87, 0x0c, 0x71, 0xfb, 0xbe, 1099 0x4d, 0x47, 0x21, 0x92, 0xca, 0x9b, 0x18, 0x2a, 0x3f, 0x2b, 0xb0, 0x24, 0x94, 0x1c, 0xe3, 0x4d, 1100 0xb9, 0x98, 0xb7, 0xc4, 0x3c, 0xde, 0x92, 0xaf, 0xcf, 0x5b, 0x15, 0x20, 0x4a, 0x86, 0x14, 0x55, 1101 0x3d, 0xb9, 0x99, 0xdd, 0xbe, 0x36, 0x3b, 0x91, 0x48, 0xb1, 0xed, 0xf6, 0xe5, 0x46, 0x8d, 0x05, 1102 0x55, 0x7e, 0x57, 0x20, 0x13, 0xf9, 0xb5, 0x2a, 0xe4, 0xc7, 0x79, 0x59, 0x8f, 0x3c, 0xbb, 0x2f, 1103 0xb5, 0xb3, 0x3e, 0x37, 0xb9, 0x3b, 0x9e, 0xdd, 0x37, 0xb3, 0x32, 0x1f, 0x36, 0xb8, 0xb8, 0x0f, 1104 0x89, 0x39, 0x7d, 0x98, 0x6a, 0x7c, 0xf2, 0xf5, 0x1a, 0x3f, 0xd5, 0x22, 0xf5, 0x7c, 0x8b, 0x7e, 1105 0x4a, 0x40, 0xba, 0xc5, 0xf7, 0x8e, 0xed, 0xfd, 0x1f, 0x3b, 0xe2, 0x1a, 0x64, 0x02, 0xec, 0x59, 1106 0xc2, 0xa3, 0x72, 0x4f, 0x3a, 0xc0, 0x9e, 0x39, 0xd3, 0xf6, 0xc5, 0x37, 0xb4, 0x5d, 0x96, 0xde, 1107 0x00, 0x6b, 0xa9, 0xf3, 0xac, 0x85, 0x90, 0x13, 0x54, 0xc8, 0xbb, 0xec, 0x16, 0xe3, 0x80, 0x5f, 1108 0x8e, 0xca, 0xec, 0xdd, 0x2b, 0xd2, 0x16, 0x48, 0x53, 0xe2, 0x58, 0x84, 0x38, 0xfa, 0xe5, 0x75, 1109 0x5a, 0x9c, 0x27, 0x4b, 0x53, 0xe2, 0x2a, 0xdf, 0x29, 0x00, 0x7b, 0x8c, 0x59, 0x5e, 0x2f, 0xbb, 1110 0x85, 0x08, 0x4f, 0xc1, 0x9a, 0x5a, 0xb9, 0x3c, 0xaf, 0x69, 0x72, 0xfd, 0x1c, 0x89, 0xe7, 0x5d, 1111 0x87, 0xfc, 0x44, 0x8c, 0x04, 0x8d, 0x93, 0xb9, 0x60, 0x92, 0xe8, 0x72, 0x68, 0x23, 0x6a, 0xe6, 1112 0x0e, 0x63, 0xa3, 0xca, 0x2f, 0x0a, 0x64, 0x78, 0x4e, 0xfb, 0x88, 0xda, 0x53, 0x3d, 0x54, 0x5e, 1113 0xbf, 0x87, 0xeb, 0x00, 0x62, 0x1a, 0xe2, 0x3e, 0x41, 0x52, 0x59, 0x19, 0x6e, 0x69, 0xbb, 0x4f, 1114 0x90, 0xf6, 0x51, 0x44, 0x78, 0xf2, 0xdf, 0x09, 0x97, 0x5b, 0x7a, 0x4c, 0xfb, 0x15, 0x48, 0xf9, 1115 0xa3, 0xa1, 0xc5, 0xae, 0x04, 0x55, 0xa8, 0xd5, 0x1f, 0x0d, 0x3b, 0x47, 0xa4, 0xf2, 0x35, 0xa4, 1116 0x3a, 0x47, 0xfc, 0x79, 0xc4, 0x24, 0x1a, 0x62, 0x2c, 0xef, 0x64, 0xf1, 0x16, 0x4a, 0x33, 0x03, 1117 0xbf, 0x82, 0x34, 0x50, 0xd9, 0xe5, 0x3b, 0x7e, 0xac, 0xb1, 0x6f, 0xcd, 0x78, 0xc5, 0x87, 0x97, 1118 0x7c, 0x72, 0xdd, 0xfc, 0x55, 0x81, 0x6c, 0xec, 0x7c, 0xd0, 0x3e, 0x80, 0x4b, 0xb5, 0xbd, 0x83, 1119 0xfa, 0x7d, 0xab, 0xb1, 0x63, 0xdd, 0xd9, 0xab, 0xde, 0xb5, 0x1e, 0x34, 0xef, 0x37, 0x0f, 0xbe, 1120 0x68, 0x16, 0x16, 0x4a, 0x97, 0x4f, 0x4e, 0x75, 0x2d, 0x86, 0x7d, 0xe0, 0x3f, 0xf6, 0xf1, 0x37, 1121 0xbe, 0xb6, 0x05, 0x6b, 0xd3, 0x21, 0xd5, 0x5a, 0x7b, 0xb7, 0xd9, 0x29, 0x28, 0xa5, 0x4b, 0x27, 1122 0xa7, 0xfa, 0x6a, 0x2c, 0xa2, 0xda, 0x25, 0xc8, 0xa7, 0xb3, 0x01, 0xf5, 0x83, 0xfd, 0xfd, 0x46, 1123 0xa7, 0x90, 0x98, 0x09, 0x90, 0x07, 0xf6, 0x0d, 0x58, 0x9d, 0x0e, 0x68, 0x36, 0xf6, 0x0a, 0xc9, 1124 0x92, 0x76, 0x72, 0xaa, 0x2f, 0xc7, 0xd0, 0x4d, 0xd7, 0x2b, 0xa5, 0xbf, 0xfd, 0xbe, 0xbc, 0xf0, 1125 0xe3, 0x0f, 0x65, 0x85, 0x55, 0x96, 0x9f, 0x3a, 0x23, 0xb4, 0xf7, 0xe1, 0x4a, 0xbb, 0x71, 0xb7, 1126 0xb9, 0xbb, 0x63, 0xed, 0xb7, 0xef, 0x5a, 0x9d, 0x2f, 0x5b, 0xbb, 0xb1, 0xea, 0x56, 0x4e, 0x4e, 1127 0xf5, 0xac, 0x2c, 0x69, 0x1e, 0xba, 0x65, 0xee, 0x3e, 0x3c, 0xe8, 0xec, 0x16, 0x14, 0x81, 0x6e, 1128 0x85, 0xe8, 0x10, 0x53, 0xc4, 0xd1, 0xb7, 0xe0, 0xea, 0x05, 0xe8, 0xa8, 0xb0, 0xd5, 0x93, 0x53, 1129 0x3d, 0xdf, 0x0a, 0x91, 0xd8, 0x3f, 0x3c, 0xc2, 0x80, 0xe2, 0x6c, 0xc4, 0x41, 0xeb, 0xa0, 0x5d, 1130 0xdd, 0x2b, 0xe8, 0xa5, 0xc2, 0xc9, 0xa9, 0x9e, 0x1b, 0x1f, 0x86, 0x0c, 0x3f, 0xa9, 0xac, 0xf6, 1131 0xf9, 0xb3, 0xb3, 0xb2, 0xf2, 0xfc, 0xac, 0xac, 0xfc, 0x79, 0x56, 0x56, 0x9e, 0xbe, 0x2c, 0x2f, 1132 0x3c, 0x7f, 0x59, 0x5e, 0xf8, 0xed, 0x65, 0x79, 0xe1, 0xab, 0x8f, 0xfb, 0x2e, 0x1d, 0x8c, 0xba, 1133 0x46, 0x0f, 0x0f, 0xb7, 0xe2, 0x7f, 0x09, 0x26, 0x9f, 0xe2, 0xaf, 0xc9, 0xf9, 0xbf, 0x0b, 0xdd, 1134 0x25, 0x6e, 0xbf, 0xfd, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4c, 0x78, 0x43, 0xdf, 0xef, 0x0c, 1135 0x00, 0x00, 1136 } 1137 1138 func (m *PartSetHeader) Marshal() (dAtA []byte, err error) { 1139 size := m.Size() 1140 dAtA = make([]byte, size) 1141 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1142 if err != nil { 1143 return nil, err 1144 } 1145 return dAtA[:n], nil 1146 } 1147 1148 func (m *PartSetHeader) MarshalTo(dAtA []byte) (int, error) { 1149 size := m.Size() 1150 return m.MarshalToSizedBuffer(dAtA[:size]) 1151 } 1152 1153 func (m *PartSetHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1154 i := len(dAtA) 1155 _ = i 1156 var l int 1157 _ = l 1158 if len(m.Hash) > 0 { 1159 i -= len(m.Hash) 1160 copy(dAtA[i:], m.Hash) 1161 i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) 1162 i-- 1163 dAtA[i] = 0x12 1164 } 1165 if m.Total != 0 { 1166 i = encodeVarintTypes(dAtA, i, uint64(m.Total)) 1167 i-- 1168 dAtA[i] = 0x8 1169 } 1170 return len(dAtA) - i, nil 1171 } 1172 1173 func (m *Part) Marshal() (dAtA []byte, err error) { 1174 size := m.Size() 1175 dAtA = make([]byte, size) 1176 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1177 if err != nil { 1178 return nil, err 1179 } 1180 return dAtA[:n], nil 1181 } 1182 1183 func (m *Part) MarshalTo(dAtA []byte) (int, error) { 1184 size := m.Size() 1185 return m.MarshalToSizedBuffer(dAtA[:size]) 1186 } 1187 1188 func (m *Part) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1189 i := len(dAtA) 1190 _ = i 1191 var l int 1192 _ = l 1193 { 1194 size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) 1195 if err != nil { 1196 return 0, err 1197 } 1198 i -= size 1199 i = encodeVarintTypes(dAtA, i, uint64(size)) 1200 } 1201 i-- 1202 dAtA[i] = 0x1a 1203 if len(m.Bytes) > 0 { 1204 i -= len(m.Bytes) 1205 copy(dAtA[i:], m.Bytes) 1206 i = encodeVarintTypes(dAtA, i, uint64(len(m.Bytes))) 1207 i-- 1208 dAtA[i] = 0x12 1209 } 1210 if m.Index != 0 { 1211 i = encodeVarintTypes(dAtA, i, uint64(m.Index)) 1212 i-- 1213 dAtA[i] = 0x8 1214 } 1215 return len(dAtA) - i, nil 1216 } 1217 1218 func (m *BlockID) Marshal() (dAtA []byte, err error) { 1219 size := m.Size() 1220 dAtA = make([]byte, size) 1221 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1222 if err != nil { 1223 return nil, err 1224 } 1225 return dAtA[:n], nil 1226 } 1227 1228 func (m *BlockID) MarshalTo(dAtA []byte) (int, error) { 1229 size := m.Size() 1230 return m.MarshalToSizedBuffer(dAtA[:size]) 1231 } 1232 1233 func (m *BlockID) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1234 i := len(dAtA) 1235 _ = i 1236 var l int 1237 _ = l 1238 { 1239 size, err := m.PartSetHeader.MarshalToSizedBuffer(dAtA[:i]) 1240 if err != nil { 1241 return 0, err 1242 } 1243 i -= size 1244 i = encodeVarintTypes(dAtA, i, uint64(size)) 1245 } 1246 i-- 1247 dAtA[i] = 0x12 1248 if len(m.Hash) > 0 { 1249 i -= len(m.Hash) 1250 copy(dAtA[i:], m.Hash) 1251 i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) 1252 i-- 1253 dAtA[i] = 0xa 1254 } 1255 return len(dAtA) - i, nil 1256 } 1257 1258 func (m *Header) Marshal() (dAtA []byte, err error) { 1259 size := m.Size() 1260 dAtA = make([]byte, size) 1261 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1262 if err != nil { 1263 return nil, err 1264 } 1265 return dAtA[:n], nil 1266 } 1267 1268 func (m *Header) MarshalTo(dAtA []byte) (int, error) { 1269 size := m.Size() 1270 return m.MarshalToSizedBuffer(dAtA[:size]) 1271 } 1272 1273 func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1274 i := len(dAtA) 1275 _ = i 1276 var l int 1277 _ = l 1278 if len(m.ProposerAddress) > 0 { 1279 i -= len(m.ProposerAddress) 1280 copy(dAtA[i:], m.ProposerAddress) 1281 i = encodeVarintTypes(dAtA, i, uint64(len(m.ProposerAddress))) 1282 i-- 1283 dAtA[i] = 0x72 1284 } 1285 if len(m.EvidenceHash) > 0 { 1286 i -= len(m.EvidenceHash) 1287 copy(dAtA[i:], m.EvidenceHash) 1288 i = encodeVarintTypes(dAtA, i, uint64(len(m.EvidenceHash))) 1289 i-- 1290 dAtA[i] = 0x6a 1291 } 1292 if len(m.LastResultsHash) > 0 { 1293 i -= len(m.LastResultsHash) 1294 copy(dAtA[i:], m.LastResultsHash) 1295 i = encodeVarintTypes(dAtA, i, uint64(len(m.LastResultsHash))) 1296 i-- 1297 dAtA[i] = 0x62 1298 } 1299 if len(m.AppHash) > 0 { 1300 i -= len(m.AppHash) 1301 copy(dAtA[i:], m.AppHash) 1302 i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash))) 1303 i-- 1304 dAtA[i] = 0x5a 1305 } 1306 if len(m.ConsensusHash) > 0 { 1307 i -= len(m.ConsensusHash) 1308 copy(dAtA[i:], m.ConsensusHash) 1309 i = encodeVarintTypes(dAtA, i, uint64(len(m.ConsensusHash))) 1310 i-- 1311 dAtA[i] = 0x52 1312 } 1313 if len(m.NextValidatorsHash) > 0 { 1314 i -= len(m.NextValidatorsHash) 1315 copy(dAtA[i:], m.NextValidatorsHash) 1316 i = encodeVarintTypes(dAtA, i, uint64(len(m.NextValidatorsHash))) 1317 i-- 1318 dAtA[i] = 0x4a 1319 } 1320 if len(m.ValidatorsHash) > 0 { 1321 i -= len(m.ValidatorsHash) 1322 copy(dAtA[i:], m.ValidatorsHash) 1323 i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorsHash))) 1324 i-- 1325 dAtA[i] = 0x42 1326 } 1327 if len(m.DataHash) > 0 { 1328 i -= len(m.DataHash) 1329 copy(dAtA[i:], m.DataHash) 1330 i = encodeVarintTypes(dAtA, i, uint64(len(m.DataHash))) 1331 i-- 1332 dAtA[i] = 0x3a 1333 } 1334 if len(m.LastCommitHash) > 0 { 1335 i -= len(m.LastCommitHash) 1336 copy(dAtA[i:], m.LastCommitHash) 1337 i = encodeVarintTypes(dAtA, i, uint64(len(m.LastCommitHash))) 1338 i-- 1339 dAtA[i] = 0x32 1340 } 1341 { 1342 size, err := m.LastBlockId.MarshalToSizedBuffer(dAtA[:i]) 1343 if err != nil { 1344 return 0, err 1345 } 1346 i -= size 1347 i = encodeVarintTypes(dAtA, i, uint64(size)) 1348 } 1349 i-- 1350 dAtA[i] = 0x2a 1351 n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) 1352 if err4 != nil { 1353 return 0, err4 1354 } 1355 i -= n4 1356 i = encodeVarintTypes(dAtA, i, uint64(n4)) 1357 i-- 1358 dAtA[i] = 0x22 1359 if m.Height != 0 { 1360 i = encodeVarintTypes(dAtA, i, uint64(m.Height)) 1361 i-- 1362 dAtA[i] = 0x18 1363 } 1364 if len(m.ChainID) > 0 { 1365 i -= len(m.ChainID) 1366 copy(dAtA[i:], m.ChainID) 1367 i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainID))) 1368 i-- 1369 dAtA[i] = 0x12 1370 } 1371 { 1372 size, err := m.Version.MarshalToSizedBuffer(dAtA[:i]) 1373 if err != nil { 1374 return 0, err 1375 } 1376 i -= size 1377 i = encodeVarintTypes(dAtA, i, uint64(size)) 1378 } 1379 i-- 1380 dAtA[i] = 0xa 1381 return len(dAtA) - i, nil 1382 } 1383 1384 func (m *Data) Marshal() (dAtA []byte, err error) { 1385 size := m.Size() 1386 dAtA = make([]byte, size) 1387 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1388 if err != nil { 1389 return nil, err 1390 } 1391 return dAtA[:n], nil 1392 } 1393 1394 func (m *Data) MarshalTo(dAtA []byte) (int, error) { 1395 size := m.Size() 1396 return m.MarshalToSizedBuffer(dAtA[:size]) 1397 } 1398 1399 func (m *Data) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1400 i := len(dAtA) 1401 _ = i 1402 var l int 1403 _ = l 1404 if len(m.Txs) > 0 { 1405 for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { 1406 i -= len(m.Txs[iNdEx]) 1407 copy(dAtA[i:], m.Txs[iNdEx]) 1408 i = encodeVarintTypes(dAtA, i, uint64(len(m.Txs[iNdEx]))) 1409 i-- 1410 dAtA[i] = 0xa 1411 } 1412 } 1413 return len(dAtA) - i, nil 1414 } 1415 1416 func (m *Vote) Marshal() (dAtA []byte, err error) { 1417 size := m.Size() 1418 dAtA = make([]byte, size) 1419 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1420 if err != nil { 1421 return nil, err 1422 } 1423 return dAtA[:n], nil 1424 } 1425 1426 func (m *Vote) MarshalTo(dAtA []byte) (int, error) { 1427 size := m.Size() 1428 return m.MarshalToSizedBuffer(dAtA[:size]) 1429 } 1430 1431 func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1432 i := len(dAtA) 1433 _ = i 1434 var l int 1435 _ = l 1436 if len(m.Signature) > 0 { 1437 i -= len(m.Signature) 1438 copy(dAtA[i:], m.Signature) 1439 i = encodeVarintTypes(dAtA, i, uint64(len(m.Signature))) 1440 i-- 1441 dAtA[i] = 0x42 1442 } 1443 if m.ValidatorIndex != 0 { 1444 i = encodeVarintTypes(dAtA, i, uint64(m.ValidatorIndex)) 1445 i-- 1446 dAtA[i] = 0x38 1447 } 1448 if len(m.ValidatorAddress) > 0 { 1449 i -= len(m.ValidatorAddress) 1450 copy(dAtA[i:], m.ValidatorAddress) 1451 i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorAddress))) 1452 i-- 1453 dAtA[i] = 0x32 1454 } 1455 n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) 1456 if err6 != nil { 1457 return 0, err6 1458 } 1459 i -= n6 1460 i = encodeVarintTypes(dAtA, i, uint64(n6)) 1461 i-- 1462 dAtA[i] = 0x2a 1463 { 1464 size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) 1465 if err != nil { 1466 return 0, err 1467 } 1468 i -= size 1469 i = encodeVarintTypes(dAtA, i, uint64(size)) 1470 } 1471 i-- 1472 dAtA[i] = 0x22 1473 if m.Round != 0 { 1474 i = encodeVarintTypes(dAtA, i, uint64(m.Round)) 1475 i-- 1476 dAtA[i] = 0x18 1477 } 1478 if m.Height != 0 { 1479 i = encodeVarintTypes(dAtA, i, uint64(m.Height)) 1480 i-- 1481 dAtA[i] = 0x10 1482 } 1483 if m.Type != 0 { 1484 i = encodeVarintTypes(dAtA, i, uint64(m.Type)) 1485 i-- 1486 dAtA[i] = 0x8 1487 } 1488 return len(dAtA) - i, nil 1489 } 1490 1491 func (m *Commit) Marshal() (dAtA []byte, err error) { 1492 size := m.Size() 1493 dAtA = make([]byte, size) 1494 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1495 if err != nil { 1496 return nil, err 1497 } 1498 return dAtA[:n], nil 1499 } 1500 1501 func (m *Commit) MarshalTo(dAtA []byte) (int, error) { 1502 size := m.Size() 1503 return m.MarshalToSizedBuffer(dAtA[:size]) 1504 } 1505 1506 func (m *Commit) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1507 i := len(dAtA) 1508 _ = i 1509 var l int 1510 _ = l 1511 if len(m.Signatures) > 0 { 1512 for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { 1513 { 1514 size, err := m.Signatures[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1515 if err != nil { 1516 return 0, err 1517 } 1518 i -= size 1519 i = encodeVarintTypes(dAtA, i, uint64(size)) 1520 } 1521 i-- 1522 dAtA[i] = 0x22 1523 } 1524 } 1525 { 1526 size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) 1527 if err != nil { 1528 return 0, err 1529 } 1530 i -= size 1531 i = encodeVarintTypes(dAtA, i, uint64(size)) 1532 } 1533 i-- 1534 dAtA[i] = 0x1a 1535 if m.Round != 0 { 1536 i = encodeVarintTypes(dAtA, i, uint64(m.Round)) 1537 i-- 1538 dAtA[i] = 0x10 1539 } 1540 if m.Height != 0 { 1541 i = encodeVarintTypes(dAtA, i, uint64(m.Height)) 1542 i-- 1543 dAtA[i] = 0x8 1544 } 1545 return len(dAtA) - i, nil 1546 } 1547 1548 func (m *CommitSig) Marshal() (dAtA []byte, err error) { 1549 size := m.Size() 1550 dAtA = make([]byte, size) 1551 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1552 if err != nil { 1553 return nil, err 1554 } 1555 return dAtA[:n], nil 1556 } 1557 1558 func (m *CommitSig) MarshalTo(dAtA []byte) (int, error) { 1559 size := m.Size() 1560 return m.MarshalToSizedBuffer(dAtA[:size]) 1561 } 1562 1563 func (m *CommitSig) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1564 i := len(dAtA) 1565 _ = i 1566 var l int 1567 _ = l 1568 if len(m.Signature) > 0 { 1569 i -= len(m.Signature) 1570 copy(dAtA[i:], m.Signature) 1571 i = encodeVarintTypes(dAtA, i, uint64(len(m.Signature))) 1572 i-- 1573 dAtA[i] = 0x22 1574 } 1575 n9, err9 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) 1576 if err9 != nil { 1577 return 0, err9 1578 } 1579 i -= n9 1580 i = encodeVarintTypes(dAtA, i, uint64(n9)) 1581 i-- 1582 dAtA[i] = 0x1a 1583 if len(m.ValidatorAddress) > 0 { 1584 i -= len(m.ValidatorAddress) 1585 copy(dAtA[i:], m.ValidatorAddress) 1586 i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorAddress))) 1587 i-- 1588 dAtA[i] = 0x12 1589 } 1590 if m.BlockIdFlag != 0 { 1591 i = encodeVarintTypes(dAtA, i, uint64(m.BlockIdFlag)) 1592 i-- 1593 dAtA[i] = 0x8 1594 } 1595 return len(dAtA) - i, nil 1596 } 1597 1598 func (m *Proposal) Marshal() (dAtA []byte, err error) { 1599 size := m.Size() 1600 dAtA = make([]byte, size) 1601 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1602 if err != nil { 1603 return nil, err 1604 } 1605 return dAtA[:n], nil 1606 } 1607 1608 func (m *Proposal) MarshalTo(dAtA []byte) (int, error) { 1609 size := m.Size() 1610 return m.MarshalToSizedBuffer(dAtA[:size]) 1611 } 1612 1613 func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1614 i := len(dAtA) 1615 _ = i 1616 var l int 1617 _ = l 1618 if len(m.Signature) > 0 { 1619 i -= len(m.Signature) 1620 copy(dAtA[i:], m.Signature) 1621 i = encodeVarintTypes(dAtA, i, uint64(len(m.Signature))) 1622 i-- 1623 dAtA[i] = 0x3a 1624 } 1625 n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) 1626 if err10 != nil { 1627 return 0, err10 1628 } 1629 i -= n10 1630 i = encodeVarintTypes(dAtA, i, uint64(n10)) 1631 i-- 1632 dAtA[i] = 0x32 1633 { 1634 size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) 1635 if err != nil { 1636 return 0, err 1637 } 1638 i -= size 1639 i = encodeVarintTypes(dAtA, i, uint64(size)) 1640 } 1641 i-- 1642 dAtA[i] = 0x2a 1643 if m.PolRound != 0 { 1644 i = encodeVarintTypes(dAtA, i, uint64(m.PolRound)) 1645 i-- 1646 dAtA[i] = 0x20 1647 } 1648 if m.Round != 0 { 1649 i = encodeVarintTypes(dAtA, i, uint64(m.Round)) 1650 i-- 1651 dAtA[i] = 0x18 1652 } 1653 if m.Height != 0 { 1654 i = encodeVarintTypes(dAtA, i, uint64(m.Height)) 1655 i-- 1656 dAtA[i] = 0x10 1657 } 1658 if m.Type != 0 { 1659 i = encodeVarintTypes(dAtA, i, uint64(m.Type)) 1660 i-- 1661 dAtA[i] = 0x8 1662 } 1663 return len(dAtA) - i, nil 1664 } 1665 1666 func (m *SignedHeader) Marshal() (dAtA []byte, err error) { 1667 size := m.Size() 1668 dAtA = make([]byte, size) 1669 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1670 if err != nil { 1671 return nil, err 1672 } 1673 return dAtA[:n], nil 1674 } 1675 1676 func (m *SignedHeader) MarshalTo(dAtA []byte) (int, error) { 1677 size := m.Size() 1678 return m.MarshalToSizedBuffer(dAtA[:size]) 1679 } 1680 1681 func (m *SignedHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1682 i := len(dAtA) 1683 _ = i 1684 var l int 1685 _ = l 1686 if m.Commit != nil { 1687 { 1688 size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i]) 1689 if err != nil { 1690 return 0, err 1691 } 1692 i -= size 1693 i = encodeVarintTypes(dAtA, i, uint64(size)) 1694 } 1695 i-- 1696 dAtA[i] = 0x12 1697 } 1698 if m.Header != nil { 1699 { 1700 size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) 1701 if err != nil { 1702 return 0, err 1703 } 1704 i -= size 1705 i = encodeVarintTypes(dAtA, i, uint64(size)) 1706 } 1707 i-- 1708 dAtA[i] = 0xa 1709 } 1710 return len(dAtA) - i, nil 1711 } 1712 1713 func (m *LightBlock) Marshal() (dAtA []byte, err error) { 1714 size := m.Size() 1715 dAtA = make([]byte, size) 1716 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1717 if err != nil { 1718 return nil, err 1719 } 1720 return dAtA[:n], nil 1721 } 1722 1723 func (m *LightBlock) MarshalTo(dAtA []byte) (int, error) { 1724 size := m.Size() 1725 return m.MarshalToSizedBuffer(dAtA[:size]) 1726 } 1727 1728 func (m *LightBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1729 i := len(dAtA) 1730 _ = i 1731 var l int 1732 _ = l 1733 if m.ValidatorSet != nil { 1734 { 1735 size, err := m.ValidatorSet.MarshalToSizedBuffer(dAtA[:i]) 1736 if err != nil { 1737 return 0, err 1738 } 1739 i -= size 1740 i = encodeVarintTypes(dAtA, i, uint64(size)) 1741 } 1742 i-- 1743 dAtA[i] = 0x12 1744 } 1745 if m.SignedHeader != nil { 1746 { 1747 size, err := m.SignedHeader.MarshalToSizedBuffer(dAtA[:i]) 1748 if err != nil { 1749 return 0, err 1750 } 1751 i -= size 1752 i = encodeVarintTypes(dAtA, i, uint64(size)) 1753 } 1754 i-- 1755 dAtA[i] = 0xa 1756 } 1757 return len(dAtA) - i, nil 1758 } 1759 1760 func (m *BlockMeta) Marshal() (dAtA []byte, err error) { 1761 size := m.Size() 1762 dAtA = make([]byte, size) 1763 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1764 if err != nil { 1765 return nil, err 1766 } 1767 return dAtA[:n], nil 1768 } 1769 1770 func (m *BlockMeta) MarshalTo(dAtA []byte) (int, error) { 1771 size := m.Size() 1772 return m.MarshalToSizedBuffer(dAtA[:size]) 1773 } 1774 1775 func (m *BlockMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1776 i := len(dAtA) 1777 _ = i 1778 var l int 1779 _ = l 1780 if m.NumTxs != 0 { 1781 i = encodeVarintTypes(dAtA, i, uint64(m.NumTxs)) 1782 i-- 1783 dAtA[i] = 0x20 1784 } 1785 { 1786 size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) 1787 if err != nil { 1788 return 0, err 1789 } 1790 i -= size 1791 i = encodeVarintTypes(dAtA, i, uint64(size)) 1792 } 1793 i-- 1794 dAtA[i] = 0x1a 1795 if m.BlockSize != 0 { 1796 i = encodeVarintTypes(dAtA, i, uint64(m.BlockSize)) 1797 i-- 1798 dAtA[i] = 0x10 1799 } 1800 { 1801 size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) 1802 if err != nil { 1803 return 0, err 1804 } 1805 i -= size 1806 i = encodeVarintTypes(dAtA, i, uint64(size)) 1807 } 1808 i-- 1809 dAtA[i] = 0xa 1810 return len(dAtA) - i, nil 1811 } 1812 1813 func (m *TxProof) Marshal() (dAtA []byte, err error) { 1814 size := m.Size() 1815 dAtA = make([]byte, size) 1816 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1817 if err != nil { 1818 return nil, err 1819 } 1820 return dAtA[:n], nil 1821 } 1822 1823 func (m *TxProof) MarshalTo(dAtA []byte) (int, error) { 1824 size := m.Size() 1825 return m.MarshalToSizedBuffer(dAtA[:size]) 1826 } 1827 1828 func (m *TxProof) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1829 i := len(dAtA) 1830 _ = i 1831 var l int 1832 _ = l 1833 if m.Proof != nil { 1834 { 1835 size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) 1836 if err != nil { 1837 return 0, err 1838 } 1839 i -= size 1840 i = encodeVarintTypes(dAtA, i, uint64(size)) 1841 } 1842 i-- 1843 dAtA[i] = 0x1a 1844 } 1845 if len(m.Data) > 0 { 1846 i -= len(m.Data) 1847 copy(dAtA[i:], m.Data) 1848 i = encodeVarintTypes(dAtA, i, uint64(len(m.Data))) 1849 i-- 1850 dAtA[i] = 0x12 1851 } 1852 if len(m.RootHash) > 0 { 1853 i -= len(m.RootHash) 1854 copy(dAtA[i:], m.RootHash) 1855 i = encodeVarintTypes(dAtA, i, uint64(len(m.RootHash))) 1856 i-- 1857 dAtA[i] = 0xa 1858 } 1859 return len(dAtA) - i, nil 1860 } 1861 1862 func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { 1863 offset -= sovTypes(v) 1864 base := offset 1865 for v >= 1<<7 { 1866 dAtA[offset] = uint8(v&0x7f | 0x80) 1867 v >>= 7 1868 offset++ 1869 } 1870 dAtA[offset] = uint8(v) 1871 return base 1872 } 1873 func (m *PartSetHeader) Size() (n int) { 1874 if m == nil { 1875 return 0 1876 } 1877 var l int 1878 _ = l 1879 if m.Total != 0 { 1880 n += 1 + sovTypes(uint64(m.Total)) 1881 } 1882 l = len(m.Hash) 1883 if l > 0 { 1884 n += 1 + l + sovTypes(uint64(l)) 1885 } 1886 return n 1887 } 1888 1889 func (m *Part) Size() (n int) { 1890 if m == nil { 1891 return 0 1892 } 1893 var l int 1894 _ = l 1895 if m.Index != 0 { 1896 n += 1 + sovTypes(uint64(m.Index)) 1897 } 1898 l = len(m.Bytes) 1899 if l > 0 { 1900 n += 1 + l + sovTypes(uint64(l)) 1901 } 1902 l = m.Proof.Size() 1903 n += 1 + l + sovTypes(uint64(l)) 1904 return n 1905 } 1906 1907 func (m *BlockID) Size() (n int) { 1908 if m == nil { 1909 return 0 1910 } 1911 var l int 1912 _ = l 1913 l = len(m.Hash) 1914 if l > 0 { 1915 n += 1 + l + sovTypes(uint64(l)) 1916 } 1917 l = m.PartSetHeader.Size() 1918 n += 1 + l + sovTypes(uint64(l)) 1919 return n 1920 } 1921 1922 func (m *Header) Size() (n int) { 1923 if m == nil { 1924 return 0 1925 } 1926 var l int 1927 _ = l 1928 l = m.Version.Size() 1929 n += 1 + l + sovTypes(uint64(l)) 1930 l = len(m.ChainID) 1931 if l > 0 { 1932 n += 1 + l + sovTypes(uint64(l)) 1933 } 1934 if m.Height != 0 { 1935 n += 1 + sovTypes(uint64(m.Height)) 1936 } 1937 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) 1938 n += 1 + l + sovTypes(uint64(l)) 1939 l = m.LastBlockId.Size() 1940 n += 1 + l + sovTypes(uint64(l)) 1941 l = len(m.LastCommitHash) 1942 if l > 0 { 1943 n += 1 + l + sovTypes(uint64(l)) 1944 } 1945 l = len(m.DataHash) 1946 if l > 0 { 1947 n += 1 + l + sovTypes(uint64(l)) 1948 } 1949 l = len(m.ValidatorsHash) 1950 if l > 0 { 1951 n += 1 + l + sovTypes(uint64(l)) 1952 } 1953 l = len(m.NextValidatorsHash) 1954 if l > 0 { 1955 n += 1 + l + sovTypes(uint64(l)) 1956 } 1957 l = len(m.ConsensusHash) 1958 if l > 0 { 1959 n += 1 + l + sovTypes(uint64(l)) 1960 } 1961 l = len(m.AppHash) 1962 if l > 0 { 1963 n += 1 + l + sovTypes(uint64(l)) 1964 } 1965 l = len(m.LastResultsHash) 1966 if l > 0 { 1967 n += 1 + l + sovTypes(uint64(l)) 1968 } 1969 l = len(m.EvidenceHash) 1970 if l > 0 { 1971 n += 1 + l + sovTypes(uint64(l)) 1972 } 1973 l = len(m.ProposerAddress) 1974 if l > 0 { 1975 n += 1 + l + sovTypes(uint64(l)) 1976 } 1977 return n 1978 } 1979 1980 func (m *Data) Size() (n int) { 1981 if m == nil { 1982 return 0 1983 } 1984 var l int 1985 _ = l 1986 if len(m.Txs) > 0 { 1987 for _, b := range m.Txs { 1988 l = len(b) 1989 n += 1 + l + sovTypes(uint64(l)) 1990 } 1991 } 1992 return n 1993 } 1994 1995 func (m *Vote) Size() (n int) { 1996 if m == nil { 1997 return 0 1998 } 1999 var l int 2000 _ = l 2001 if m.Type != 0 { 2002 n += 1 + sovTypes(uint64(m.Type)) 2003 } 2004 if m.Height != 0 { 2005 n += 1 + sovTypes(uint64(m.Height)) 2006 } 2007 if m.Round != 0 { 2008 n += 1 + sovTypes(uint64(m.Round)) 2009 } 2010 l = m.BlockID.Size() 2011 n += 1 + l + sovTypes(uint64(l)) 2012 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) 2013 n += 1 + l + sovTypes(uint64(l)) 2014 l = len(m.ValidatorAddress) 2015 if l > 0 { 2016 n += 1 + l + sovTypes(uint64(l)) 2017 } 2018 if m.ValidatorIndex != 0 { 2019 n += 1 + sovTypes(uint64(m.ValidatorIndex)) 2020 } 2021 l = len(m.Signature) 2022 if l > 0 { 2023 n += 1 + l + sovTypes(uint64(l)) 2024 } 2025 return n 2026 } 2027 2028 func (m *Commit) Size() (n int) { 2029 if m == nil { 2030 return 0 2031 } 2032 var l int 2033 _ = l 2034 if m.Height != 0 { 2035 n += 1 + sovTypes(uint64(m.Height)) 2036 } 2037 if m.Round != 0 { 2038 n += 1 + sovTypes(uint64(m.Round)) 2039 } 2040 l = m.BlockID.Size() 2041 n += 1 + l + sovTypes(uint64(l)) 2042 if len(m.Signatures) > 0 { 2043 for _, e := range m.Signatures { 2044 l = e.Size() 2045 n += 1 + l + sovTypes(uint64(l)) 2046 } 2047 } 2048 return n 2049 } 2050 2051 func (m *CommitSig) Size() (n int) { 2052 if m == nil { 2053 return 0 2054 } 2055 var l int 2056 _ = l 2057 if m.BlockIdFlag != 0 { 2058 n += 1 + sovTypes(uint64(m.BlockIdFlag)) 2059 } 2060 l = len(m.ValidatorAddress) 2061 if l > 0 { 2062 n += 1 + l + sovTypes(uint64(l)) 2063 } 2064 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) 2065 n += 1 + l + sovTypes(uint64(l)) 2066 l = len(m.Signature) 2067 if l > 0 { 2068 n += 1 + l + sovTypes(uint64(l)) 2069 } 2070 return n 2071 } 2072 2073 func (m *Proposal) Size() (n int) { 2074 if m == nil { 2075 return 0 2076 } 2077 var l int 2078 _ = l 2079 if m.Type != 0 { 2080 n += 1 + sovTypes(uint64(m.Type)) 2081 } 2082 if m.Height != 0 { 2083 n += 1 + sovTypes(uint64(m.Height)) 2084 } 2085 if m.Round != 0 { 2086 n += 1 + sovTypes(uint64(m.Round)) 2087 } 2088 if m.PolRound != 0 { 2089 n += 1 + sovTypes(uint64(m.PolRound)) 2090 } 2091 l = m.BlockID.Size() 2092 n += 1 + l + sovTypes(uint64(l)) 2093 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) 2094 n += 1 + l + sovTypes(uint64(l)) 2095 l = len(m.Signature) 2096 if l > 0 { 2097 n += 1 + l + sovTypes(uint64(l)) 2098 } 2099 return n 2100 } 2101 2102 func (m *SignedHeader) Size() (n int) { 2103 if m == nil { 2104 return 0 2105 } 2106 var l int 2107 _ = l 2108 if m.Header != nil { 2109 l = m.Header.Size() 2110 n += 1 + l + sovTypes(uint64(l)) 2111 } 2112 if m.Commit != nil { 2113 l = m.Commit.Size() 2114 n += 1 + l + sovTypes(uint64(l)) 2115 } 2116 return n 2117 } 2118 2119 func (m *LightBlock) Size() (n int) { 2120 if m == nil { 2121 return 0 2122 } 2123 var l int 2124 _ = l 2125 if m.SignedHeader != nil { 2126 l = m.SignedHeader.Size() 2127 n += 1 + l + sovTypes(uint64(l)) 2128 } 2129 if m.ValidatorSet != nil { 2130 l = m.ValidatorSet.Size() 2131 n += 1 + l + sovTypes(uint64(l)) 2132 } 2133 return n 2134 } 2135 2136 func (m *BlockMeta) Size() (n int) { 2137 if m == nil { 2138 return 0 2139 } 2140 var l int 2141 _ = l 2142 l = m.BlockID.Size() 2143 n += 1 + l + sovTypes(uint64(l)) 2144 if m.BlockSize != 0 { 2145 n += 1 + sovTypes(uint64(m.BlockSize)) 2146 } 2147 l = m.Header.Size() 2148 n += 1 + l + sovTypes(uint64(l)) 2149 if m.NumTxs != 0 { 2150 n += 1 + sovTypes(uint64(m.NumTxs)) 2151 } 2152 return n 2153 } 2154 2155 func (m *TxProof) Size() (n int) { 2156 if m == nil { 2157 return 0 2158 } 2159 var l int 2160 _ = l 2161 l = len(m.RootHash) 2162 if l > 0 { 2163 n += 1 + l + sovTypes(uint64(l)) 2164 } 2165 l = len(m.Data) 2166 if l > 0 { 2167 n += 1 + l + sovTypes(uint64(l)) 2168 } 2169 if m.Proof != nil { 2170 l = m.Proof.Size() 2171 n += 1 + l + sovTypes(uint64(l)) 2172 } 2173 return n 2174 } 2175 2176 func sovTypes(x uint64) (n int) { 2177 return (math_bits.Len64(x|1) + 6) / 7 2178 } 2179 func sozTypes(x uint64) (n int) { 2180 return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 2181 } 2182 func (m *PartSetHeader) Unmarshal(dAtA []byte) error { 2183 l := len(dAtA) 2184 iNdEx := 0 2185 for iNdEx < l { 2186 preIndex := iNdEx 2187 var wire uint64 2188 for shift := uint(0); ; shift += 7 { 2189 if shift >= 64 { 2190 return ErrIntOverflowTypes 2191 } 2192 if iNdEx >= l { 2193 return io.ErrUnexpectedEOF 2194 } 2195 b := dAtA[iNdEx] 2196 iNdEx++ 2197 wire |= uint64(b&0x7F) << shift 2198 if b < 0x80 { 2199 break 2200 } 2201 } 2202 fieldNum := int32(wire >> 3) 2203 wireType := int(wire & 0x7) 2204 if wireType == 4 { 2205 return fmt.Errorf("proto: PartSetHeader: wiretype end group for non-group") 2206 } 2207 if fieldNum <= 0 { 2208 return fmt.Errorf("proto: PartSetHeader: illegal tag %d (wire type %d)", fieldNum, wire) 2209 } 2210 switch fieldNum { 2211 case 1: 2212 if wireType != 0 { 2213 return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) 2214 } 2215 m.Total = 0 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 m.Total |= uint32(b&0x7F) << shift 2226 if b < 0x80 { 2227 break 2228 } 2229 } 2230 case 2: 2231 if wireType != 2 { 2232 return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) 2233 } 2234 var byteLen int 2235 for shift := uint(0); ; shift += 7 { 2236 if shift >= 64 { 2237 return ErrIntOverflowTypes 2238 } 2239 if iNdEx >= l { 2240 return io.ErrUnexpectedEOF 2241 } 2242 b := dAtA[iNdEx] 2243 iNdEx++ 2244 byteLen |= int(b&0x7F) << shift 2245 if b < 0x80 { 2246 break 2247 } 2248 } 2249 if byteLen < 0 { 2250 return ErrInvalidLengthTypes 2251 } 2252 postIndex := iNdEx + byteLen 2253 if postIndex < 0 { 2254 return ErrInvalidLengthTypes 2255 } 2256 if postIndex > l { 2257 return io.ErrUnexpectedEOF 2258 } 2259 m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) 2260 if m.Hash == nil { 2261 m.Hash = []byte{} 2262 } 2263 iNdEx = postIndex 2264 default: 2265 iNdEx = preIndex 2266 skippy, err := skipTypes(dAtA[iNdEx:]) 2267 if err != nil { 2268 return err 2269 } 2270 if (skippy < 0) || (iNdEx+skippy) < 0 { 2271 return ErrInvalidLengthTypes 2272 } 2273 if (iNdEx + skippy) > l { 2274 return io.ErrUnexpectedEOF 2275 } 2276 iNdEx += skippy 2277 } 2278 } 2279 2280 if iNdEx > l { 2281 return io.ErrUnexpectedEOF 2282 } 2283 return nil 2284 } 2285 func (m *Part) Unmarshal(dAtA []byte) error { 2286 l := len(dAtA) 2287 iNdEx := 0 2288 for iNdEx < l { 2289 preIndex := iNdEx 2290 var wire uint64 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 wire |= uint64(b&0x7F) << shift 2301 if b < 0x80 { 2302 break 2303 } 2304 } 2305 fieldNum := int32(wire >> 3) 2306 wireType := int(wire & 0x7) 2307 if wireType == 4 { 2308 return fmt.Errorf("proto: Part: wiretype end group for non-group") 2309 } 2310 if fieldNum <= 0 { 2311 return fmt.Errorf("proto: Part: illegal tag %d (wire type %d)", fieldNum, wire) 2312 } 2313 switch fieldNum { 2314 case 1: 2315 if wireType != 0 { 2316 return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) 2317 } 2318 m.Index = 0 2319 for shift := uint(0); ; shift += 7 { 2320 if shift >= 64 { 2321 return ErrIntOverflowTypes 2322 } 2323 if iNdEx >= l { 2324 return io.ErrUnexpectedEOF 2325 } 2326 b := dAtA[iNdEx] 2327 iNdEx++ 2328 m.Index |= uint32(b&0x7F) << shift 2329 if b < 0x80 { 2330 break 2331 } 2332 } 2333 case 2: 2334 if wireType != 2 { 2335 return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) 2336 } 2337 var byteLen int 2338 for shift := uint(0); ; shift += 7 { 2339 if shift >= 64 { 2340 return ErrIntOverflowTypes 2341 } 2342 if iNdEx >= l { 2343 return io.ErrUnexpectedEOF 2344 } 2345 b := dAtA[iNdEx] 2346 iNdEx++ 2347 byteLen |= int(b&0x7F) << shift 2348 if b < 0x80 { 2349 break 2350 } 2351 } 2352 if byteLen < 0 { 2353 return ErrInvalidLengthTypes 2354 } 2355 postIndex := iNdEx + byteLen 2356 if postIndex < 0 { 2357 return ErrInvalidLengthTypes 2358 } 2359 if postIndex > l { 2360 return io.ErrUnexpectedEOF 2361 } 2362 m.Bytes = append(m.Bytes[:0], dAtA[iNdEx:postIndex]...) 2363 if m.Bytes == nil { 2364 m.Bytes = []byte{} 2365 } 2366 iNdEx = postIndex 2367 case 3: 2368 if wireType != 2 { 2369 return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) 2370 } 2371 var msglen int 2372 for shift := uint(0); ; shift += 7 { 2373 if shift >= 64 { 2374 return ErrIntOverflowTypes 2375 } 2376 if iNdEx >= l { 2377 return io.ErrUnexpectedEOF 2378 } 2379 b := dAtA[iNdEx] 2380 iNdEx++ 2381 msglen |= int(b&0x7F) << shift 2382 if b < 0x80 { 2383 break 2384 } 2385 } 2386 if msglen < 0 { 2387 return ErrInvalidLengthTypes 2388 } 2389 postIndex := iNdEx + msglen 2390 if postIndex < 0 { 2391 return ErrInvalidLengthTypes 2392 } 2393 if postIndex > l { 2394 return io.ErrUnexpectedEOF 2395 } 2396 if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2397 return err 2398 } 2399 iNdEx = postIndex 2400 default: 2401 iNdEx = preIndex 2402 skippy, err := skipTypes(dAtA[iNdEx:]) 2403 if err != nil { 2404 return err 2405 } 2406 if (skippy < 0) || (iNdEx+skippy) < 0 { 2407 return ErrInvalidLengthTypes 2408 } 2409 if (iNdEx + skippy) > l { 2410 return io.ErrUnexpectedEOF 2411 } 2412 iNdEx += skippy 2413 } 2414 } 2415 2416 if iNdEx > l { 2417 return io.ErrUnexpectedEOF 2418 } 2419 return nil 2420 } 2421 func (m *BlockID) Unmarshal(dAtA []byte) error { 2422 l := len(dAtA) 2423 iNdEx := 0 2424 for iNdEx < l { 2425 preIndex := iNdEx 2426 var wire uint64 2427 for shift := uint(0); ; shift += 7 { 2428 if shift >= 64 { 2429 return ErrIntOverflowTypes 2430 } 2431 if iNdEx >= l { 2432 return io.ErrUnexpectedEOF 2433 } 2434 b := dAtA[iNdEx] 2435 iNdEx++ 2436 wire |= uint64(b&0x7F) << shift 2437 if b < 0x80 { 2438 break 2439 } 2440 } 2441 fieldNum := int32(wire >> 3) 2442 wireType := int(wire & 0x7) 2443 if wireType == 4 { 2444 return fmt.Errorf("proto: BlockID: wiretype end group for non-group") 2445 } 2446 if fieldNum <= 0 { 2447 return fmt.Errorf("proto: BlockID: illegal tag %d (wire type %d)", fieldNum, wire) 2448 } 2449 switch fieldNum { 2450 case 1: 2451 if wireType != 2 { 2452 return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) 2453 } 2454 var byteLen int 2455 for shift := uint(0); ; shift += 7 { 2456 if shift >= 64 { 2457 return ErrIntOverflowTypes 2458 } 2459 if iNdEx >= l { 2460 return io.ErrUnexpectedEOF 2461 } 2462 b := dAtA[iNdEx] 2463 iNdEx++ 2464 byteLen |= int(b&0x7F) << shift 2465 if b < 0x80 { 2466 break 2467 } 2468 } 2469 if byteLen < 0 { 2470 return ErrInvalidLengthTypes 2471 } 2472 postIndex := iNdEx + byteLen 2473 if postIndex < 0 { 2474 return ErrInvalidLengthTypes 2475 } 2476 if postIndex > l { 2477 return io.ErrUnexpectedEOF 2478 } 2479 m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) 2480 if m.Hash == nil { 2481 m.Hash = []byte{} 2482 } 2483 iNdEx = postIndex 2484 case 2: 2485 if wireType != 2 { 2486 return fmt.Errorf("proto: wrong wireType = %d for field PartSetHeader", wireType) 2487 } 2488 var msglen int 2489 for shift := uint(0); ; shift += 7 { 2490 if shift >= 64 { 2491 return ErrIntOverflowTypes 2492 } 2493 if iNdEx >= l { 2494 return io.ErrUnexpectedEOF 2495 } 2496 b := dAtA[iNdEx] 2497 iNdEx++ 2498 msglen |= int(b&0x7F) << shift 2499 if b < 0x80 { 2500 break 2501 } 2502 } 2503 if msglen < 0 { 2504 return ErrInvalidLengthTypes 2505 } 2506 postIndex := iNdEx + msglen 2507 if postIndex < 0 { 2508 return ErrInvalidLengthTypes 2509 } 2510 if postIndex > l { 2511 return io.ErrUnexpectedEOF 2512 } 2513 if err := m.PartSetHeader.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 *Header) 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: Header: wiretype end group for non-group") 2562 } 2563 if fieldNum <= 0 { 2564 return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire) 2565 } 2566 switch fieldNum { 2567 case 1: 2568 if wireType != 2 { 2569 return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) 2570 } 2571 var msglen int 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 msglen |= int(b&0x7F) << shift 2582 if b < 0x80 { 2583 break 2584 } 2585 } 2586 if msglen < 0 { 2587 return ErrInvalidLengthTypes 2588 } 2589 postIndex := iNdEx + msglen 2590 if postIndex < 0 { 2591 return ErrInvalidLengthTypes 2592 } 2593 if postIndex > l { 2594 return io.ErrUnexpectedEOF 2595 } 2596 if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2597 return err 2598 } 2599 iNdEx = postIndex 2600 case 2: 2601 if wireType != 2 { 2602 return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) 2603 } 2604 var stringLen uint64 2605 for shift := uint(0); ; shift += 7 { 2606 if shift >= 64 { 2607 return ErrIntOverflowTypes 2608 } 2609 if iNdEx >= l { 2610 return io.ErrUnexpectedEOF 2611 } 2612 b := dAtA[iNdEx] 2613 iNdEx++ 2614 stringLen |= uint64(b&0x7F) << shift 2615 if b < 0x80 { 2616 break 2617 } 2618 } 2619 intStringLen := int(stringLen) 2620 if intStringLen < 0 { 2621 return ErrInvalidLengthTypes 2622 } 2623 postIndex := iNdEx + intStringLen 2624 if postIndex < 0 { 2625 return ErrInvalidLengthTypes 2626 } 2627 if postIndex > l { 2628 return io.ErrUnexpectedEOF 2629 } 2630 m.ChainID = string(dAtA[iNdEx:postIndex]) 2631 iNdEx = postIndex 2632 case 3: 2633 if wireType != 0 { 2634 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 2635 } 2636 m.Height = 0 2637 for shift := uint(0); ; shift += 7 { 2638 if shift >= 64 { 2639 return ErrIntOverflowTypes 2640 } 2641 if iNdEx >= l { 2642 return io.ErrUnexpectedEOF 2643 } 2644 b := dAtA[iNdEx] 2645 iNdEx++ 2646 m.Height |= int64(b&0x7F) << shift 2647 if b < 0x80 { 2648 break 2649 } 2650 } 2651 case 4: 2652 if wireType != 2 { 2653 return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) 2654 } 2655 var msglen int 2656 for shift := uint(0); ; shift += 7 { 2657 if shift >= 64 { 2658 return ErrIntOverflowTypes 2659 } 2660 if iNdEx >= l { 2661 return io.ErrUnexpectedEOF 2662 } 2663 b := dAtA[iNdEx] 2664 iNdEx++ 2665 msglen |= int(b&0x7F) << shift 2666 if b < 0x80 { 2667 break 2668 } 2669 } 2670 if msglen < 0 { 2671 return ErrInvalidLengthTypes 2672 } 2673 postIndex := iNdEx + msglen 2674 if postIndex < 0 { 2675 return ErrInvalidLengthTypes 2676 } 2677 if postIndex > l { 2678 return io.ErrUnexpectedEOF 2679 } 2680 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { 2681 return err 2682 } 2683 iNdEx = postIndex 2684 case 5: 2685 if wireType != 2 { 2686 return fmt.Errorf("proto: wrong wireType = %d for field LastBlockId", wireType) 2687 } 2688 var msglen int 2689 for shift := uint(0); ; shift += 7 { 2690 if shift >= 64 { 2691 return ErrIntOverflowTypes 2692 } 2693 if iNdEx >= l { 2694 return io.ErrUnexpectedEOF 2695 } 2696 b := dAtA[iNdEx] 2697 iNdEx++ 2698 msglen |= int(b&0x7F) << shift 2699 if b < 0x80 { 2700 break 2701 } 2702 } 2703 if msglen < 0 { 2704 return ErrInvalidLengthTypes 2705 } 2706 postIndex := iNdEx + msglen 2707 if postIndex < 0 { 2708 return ErrInvalidLengthTypes 2709 } 2710 if postIndex > l { 2711 return io.ErrUnexpectedEOF 2712 } 2713 if err := m.LastBlockId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2714 return err 2715 } 2716 iNdEx = postIndex 2717 case 6: 2718 if wireType != 2 { 2719 return fmt.Errorf("proto: wrong wireType = %d for field LastCommitHash", wireType) 2720 } 2721 var byteLen int 2722 for shift := uint(0); ; shift += 7 { 2723 if shift >= 64 { 2724 return ErrIntOverflowTypes 2725 } 2726 if iNdEx >= l { 2727 return io.ErrUnexpectedEOF 2728 } 2729 b := dAtA[iNdEx] 2730 iNdEx++ 2731 byteLen |= int(b&0x7F) << shift 2732 if b < 0x80 { 2733 break 2734 } 2735 } 2736 if byteLen < 0 { 2737 return ErrInvalidLengthTypes 2738 } 2739 postIndex := iNdEx + byteLen 2740 if postIndex < 0 { 2741 return ErrInvalidLengthTypes 2742 } 2743 if postIndex > l { 2744 return io.ErrUnexpectedEOF 2745 } 2746 m.LastCommitHash = append(m.LastCommitHash[:0], dAtA[iNdEx:postIndex]...) 2747 if m.LastCommitHash == nil { 2748 m.LastCommitHash = []byte{} 2749 } 2750 iNdEx = postIndex 2751 case 7: 2752 if wireType != 2 { 2753 return fmt.Errorf("proto: wrong wireType = %d for field DataHash", wireType) 2754 } 2755 var byteLen int 2756 for shift := uint(0); ; shift += 7 { 2757 if shift >= 64 { 2758 return ErrIntOverflowTypes 2759 } 2760 if iNdEx >= l { 2761 return io.ErrUnexpectedEOF 2762 } 2763 b := dAtA[iNdEx] 2764 iNdEx++ 2765 byteLen |= int(b&0x7F) << shift 2766 if b < 0x80 { 2767 break 2768 } 2769 } 2770 if byteLen < 0 { 2771 return ErrInvalidLengthTypes 2772 } 2773 postIndex := iNdEx + byteLen 2774 if postIndex < 0 { 2775 return ErrInvalidLengthTypes 2776 } 2777 if postIndex > l { 2778 return io.ErrUnexpectedEOF 2779 } 2780 m.DataHash = append(m.DataHash[:0], dAtA[iNdEx:postIndex]...) 2781 if m.DataHash == nil { 2782 m.DataHash = []byte{} 2783 } 2784 iNdEx = postIndex 2785 case 8: 2786 if wireType != 2 { 2787 return fmt.Errorf("proto: wrong wireType = %d for field ValidatorsHash", wireType) 2788 } 2789 var byteLen int 2790 for shift := uint(0); ; shift += 7 { 2791 if shift >= 64 { 2792 return ErrIntOverflowTypes 2793 } 2794 if iNdEx >= l { 2795 return io.ErrUnexpectedEOF 2796 } 2797 b := dAtA[iNdEx] 2798 iNdEx++ 2799 byteLen |= int(b&0x7F) << shift 2800 if b < 0x80 { 2801 break 2802 } 2803 } 2804 if byteLen < 0 { 2805 return ErrInvalidLengthTypes 2806 } 2807 postIndex := iNdEx + byteLen 2808 if postIndex < 0 { 2809 return ErrInvalidLengthTypes 2810 } 2811 if postIndex > l { 2812 return io.ErrUnexpectedEOF 2813 } 2814 m.ValidatorsHash = append(m.ValidatorsHash[:0], dAtA[iNdEx:postIndex]...) 2815 if m.ValidatorsHash == nil { 2816 m.ValidatorsHash = []byte{} 2817 } 2818 iNdEx = postIndex 2819 case 9: 2820 if wireType != 2 { 2821 return fmt.Errorf("proto: wrong wireType = %d for field NextValidatorsHash", wireType) 2822 } 2823 var byteLen int 2824 for shift := uint(0); ; shift += 7 { 2825 if shift >= 64 { 2826 return ErrIntOverflowTypes 2827 } 2828 if iNdEx >= l { 2829 return io.ErrUnexpectedEOF 2830 } 2831 b := dAtA[iNdEx] 2832 iNdEx++ 2833 byteLen |= int(b&0x7F) << shift 2834 if b < 0x80 { 2835 break 2836 } 2837 } 2838 if byteLen < 0 { 2839 return ErrInvalidLengthTypes 2840 } 2841 postIndex := iNdEx + byteLen 2842 if postIndex < 0 { 2843 return ErrInvalidLengthTypes 2844 } 2845 if postIndex > l { 2846 return io.ErrUnexpectedEOF 2847 } 2848 m.NextValidatorsHash = append(m.NextValidatorsHash[:0], dAtA[iNdEx:postIndex]...) 2849 if m.NextValidatorsHash == nil { 2850 m.NextValidatorsHash = []byte{} 2851 } 2852 iNdEx = postIndex 2853 case 10: 2854 if wireType != 2 { 2855 return fmt.Errorf("proto: wrong wireType = %d for field ConsensusHash", wireType) 2856 } 2857 var byteLen int 2858 for shift := uint(0); ; shift += 7 { 2859 if shift >= 64 { 2860 return ErrIntOverflowTypes 2861 } 2862 if iNdEx >= l { 2863 return io.ErrUnexpectedEOF 2864 } 2865 b := dAtA[iNdEx] 2866 iNdEx++ 2867 byteLen |= int(b&0x7F) << shift 2868 if b < 0x80 { 2869 break 2870 } 2871 } 2872 if byteLen < 0 { 2873 return ErrInvalidLengthTypes 2874 } 2875 postIndex := iNdEx + byteLen 2876 if postIndex < 0 { 2877 return ErrInvalidLengthTypes 2878 } 2879 if postIndex > l { 2880 return io.ErrUnexpectedEOF 2881 } 2882 m.ConsensusHash = append(m.ConsensusHash[:0], dAtA[iNdEx:postIndex]...) 2883 if m.ConsensusHash == nil { 2884 m.ConsensusHash = []byte{} 2885 } 2886 iNdEx = postIndex 2887 case 11: 2888 if wireType != 2 { 2889 return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType) 2890 } 2891 var byteLen int 2892 for shift := uint(0); ; shift += 7 { 2893 if shift >= 64 { 2894 return ErrIntOverflowTypes 2895 } 2896 if iNdEx >= l { 2897 return io.ErrUnexpectedEOF 2898 } 2899 b := dAtA[iNdEx] 2900 iNdEx++ 2901 byteLen |= int(b&0x7F) << shift 2902 if b < 0x80 { 2903 break 2904 } 2905 } 2906 if byteLen < 0 { 2907 return ErrInvalidLengthTypes 2908 } 2909 postIndex := iNdEx + byteLen 2910 if postIndex < 0 { 2911 return ErrInvalidLengthTypes 2912 } 2913 if postIndex > l { 2914 return io.ErrUnexpectedEOF 2915 } 2916 m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...) 2917 if m.AppHash == nil { 2918 m.AppHash = []byte{} 2919 } 2920 iNdEx = postIndex 2921 case 12: 2922 if wireType != 2 { 2923 return fmt.Errorf("proto: wrong wireType = %d for field LastResultsHash", wireType) 2924 } 2925 var byteLen int 2926 for shift := uint(0); ; shift += 7 { 2927 if shift >= 64 { 2928 return ErrIntOverflowTypes 2929 } 2930 if iNdEx >= l { 2931 return io.ErrUnexpectedEOF 2932 } 2933 b := dAtA[iNdEx] 2934 iNdEx++ 2935 byteLen |= int(b&0x7F) << shift 2936 if b < 0x80 { 2937 break 2938 } 2939 } 2940 if byteLen < 0 { 2941 return ErrInvalidLengthTypes 2942 } 2943 postIndex := iNdEx + byteLen 2944 if postIndex < 0 { 2945 return ErrInvalidLengthTypes 2946 } 2947 if postIndex > l { 2948 return io.ErrUnexpectedEOF 2949 } 2950 m.LastResultsHash = append(m.LastResultsHash[:0], dAtA[iNdEx:postIndex]...) 2951 if m.LastResultsHash == nil { 2952 m.LastResultsHash = []byte{} 2953 } 2954 iNdEx = postIndex 2955 case 13: 2956 if wireType != 2 { 2957 return fmt.Errorf("proto: wrong wireType = %d for field EvidenceHash", wireType) 2958 } 2959 var byteLen int 2960 for shift := uint(0); ; shift += 7 { 2961 if shift >= 64 { 2962 return ErrIntOverflowTypes 2963 } 2964 if iNdEx >= l { 2965 return io.ErrUnexpectedEOF 2966 } 2967 b := dAtA[iNdEx] 2968 iNdEx++ 2969 byteLen |= int(b&0x7F) << shift 2970 if b < 0x80 { 2971 break 2972 } 2973 } 2974 if byteLen < 0 { 2975 return ErrInvalidLengthTypes 2976 } 2977 postIndex := iNdEx + byteLen 2978 if postIndex < 0 { 2979 return ErrInvalidLengthTypes 2980 } 2981 if postIndex > l { 2982 return io.ErrUnexpectedEOF 2983 } 2984 m.EvidenceHash = append(m.EvidenceHash[:0], dAtA[iNdEx:postIndex]...) 2985 if m.EvidenceHash == nil { 2986 m.EvidenceHash = []byte{} 2987 } 2988 iNdEx = postIndex 2989 case 14: 2990 if wireType != 2 { 2991 return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) 2992 } 2993 var byteLen int 2994 for shift := uint(0); ; shift += 7 { 2995 if shift >= 64 { 2996 return ErrIntOverflowTypes 2997 } 2998 if iNdEx >= l { 2999 return io.ErrUnexpectedEOF 3000 } 3001 b := dAtA[iNdEx] 3002 iNdEx++ 3003 byteLen |= int(b&0x7F) << shift 3004 if b < 0x80 { 3005 break 3006 } 3007 } 3008 if byteLen < 0 { 3009 return ErrInvalidLengthTypes 3010 } 3011 postIndex := iNdEx + byteLen 3012 if postIndex < 0 { 3013 return ErrInvalidLengthTypes 3014 } 3015 if postIndex > l { 3016 return io.ErrUnexpectedEOF 3017 } 3018 m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) 3019 if m.ProposerAddress == nil { 3020 m.ProposerAddress = []byte{} 3021 } 3022 iNdEx = postIndex 3023 default: 3024 iNdEx = preIndex 3025 skippy, err := skipTypes(dAtA[iNdEx:]) 3026 if err != nil { 3027 return err 3028 } 3029 if (skippy < 0) || (iNdEx+skippy) < 0 { 3030 return ErrInvalidLengthTypes 3031 } 3032 if (iNdEx + skippy) > l { 3033 return io.ErrUnexpectedEOF 3034 } 3035 iNdEx += skippy 3036 } 3037 } 3038 3039 if iNdEx > l { 3040 return io.ErrUnexpectedEOF 3041 } 3042 return nil 3043 } 3044 func (m *Data) Unmarshal(dAtA []byte) error { 3045 l := len(dAtA) 3046 iNdEx := 0 3047 for iNdEx < l { 3048 preIndex := iNdEx 3049 var wire uint64 3050 for shift := uint(0); ; shift += 7 { 3051 if shift >= 64 { 3052 return ErrIntOverflowTypes 3053 } 3054 if iNdEx >= l { 3055 return io.ErrUnexpectedEOF 3056 } 3057 b := dAtA[iNdEx] 3058 iNdEx++ 3059 wire |= uint64(b&0x7F) << shift 3060 if b < 0x80 { 3061 break 3062 } 3063 } 3064 fieldNum := int32(wire >> 3) 3065 wireType := int(wire & 0x7) 3066 if wireType == 4 { 3067 return fmt.Errorf("proto: Data: wiretype end group for non-group") 3068 } 3069 if fieldNum <= 0 { 3070 return fmt.Errorf("proto: Data: illegal tag %d (wire type %d)", fieldNum, wire) 3071 } 3072 switch fieldNum { 3073 case 1: 3074 if wireType != 2 { 3075 return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) 3076 } 3077 var byteLen int 3078 for shift := uint(0); ; shift += 7 { 3079 if shift >= 64 { 3080 return ErrIntOverflowTypes 3081 } 3082 if iNdEx >= l { 3083 return io.ErrUnexpectedEOF 3084 } 3085 b := dAtA[iNdEx] 3086 iNdEx++ 3087 byteLen |= int(b&0x7F) << shift 3088 if b < 0x80 { 3089 break 3090 } 3091 } 3092 if byteLen < 0 { 3093 return ErrInvalidLengthTypes 3094 } 3095 postIndex := iNdEx + byteLen 3096 if postIndex < 0 { 3097 return ErrInvalidLengthTypes 3098 } 3099 if postIndex > l { 3100 return io.ErrUnexpectedEOF 3101 } 3102 m.Txs = append(m.Txs, make([]byte, postIndex-iNdEx)) 3103 copy(m.Txs[len(m.Txs)-1], dAtA[iNdEx:postIndex]) 3104 iNdEx = postIndex 3105 default: 3106 iNdEx = preIndex 3107 skippy, err := skipTypes(dAtA[iNdEx:]) 3108 if err != nil { 3109 return err 3110 } 3111 if (skippy < 0) || (iNdEx+skippy) < 0 { 3112 return ErrInvalidLengthTypes 3113 } 3114 if (iNdEx + skippy) > l { 3115 return io.ErrUnexpectedEOF 3116 } 3117 iNdEx += skippy 3118 } 3119 } 3120 3121 if iNdEx > l { 3122 return io.ErrUnexpectedEOF 3123 } 3124 return nil 3125 } 3126 func (m *Vote) Unmarshal(dAtA []byte) error { 3127 l := len(dAtA) 3128 iNdEx := 0 3129 for iNdEx < l { 3130 preIndex := iNdEx 3131 var wire uint64 3132 for shift := uint(0); ; shift += 7 { 3133 if shift >= 64 { 3134 return ErrIntOverflowTypes 3135 } 3136 if iNdEx >= l { 3137 return io.ErrUnexpectedEOF 3138 } 3139 b := dAtA[iNdEx] 3140 iNdEx++ 3141 wire |= uint64(b&0x7F) << shift 3142 if b < 0x80 { 3143 break 3144 } 3145 } 3146 fieldNum := int32(wire >> 3) 3147 wireType := int(wire & 0x7) 3148 if wireType == 4 { 3149 return fmt.Errorf("proto: Vote: wiretype end group for non-group") 3150 } 3151 if fieldNum <= 0 { 3152 return fmt.Errorf("proto: Vote: illegal tag %d (wire type %d)", fieldNum, wire) 3153 } 3154 switch fieldNum { 3155 case 1: 3156 if wireType != 0 { 3157 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 3158 } 3159 m.Type = 0 3160 for shift := uint(0); ; shift += 7 { 3161 if shift >= 64 { 3162 return ErrIntOverflowTypes 3163 } 3164 if iNdEx >= l { 3165 return io.ErrUnexpectedEOF 3166 } 3167 b := dAtA[iNdEx] 3168 iNdEx++ 3169 m.Type |= SignedMsgType(b&0x7F) << shift 3170 if b < 0x80 { 3171 break 3172 } 3173 } 3174 case 2: 3175 if wireType != 0 { 3176 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 3177 } 3178 m.Height = 0 3179 for shift := uint(0); ; shift += 7 { 3180 if shift >= 64 { 3181 return ErrIntOverflowTypes 3182 } 3183 if iNdEx >= l { 3184 return io.ErrUnexpectedEOF 3185 } 3186 b := dAtA[iNdEx] 3187 iNdEx++ 3188 m.Height |= int64(b&0x7F) << shift 3189 if b < 0x80 { 3190 break 3191 } 3192 } 3193 case 3: 3194 if wireType != 0 { 3195 return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) 3196 } 3197 m.Round = 0 3198 for shift := uint(0); ; shift += 7 { 3199 if shift >= 64 { 3200 return ErrIntOverflowTypes 3201 } 3202 if iNdEx >= l { 3203 return io.ErrUnexpectedEOF 3204 } 3205 b := dAtA[iNdEx] 3206 iNdEx++ 3207 m.Round |= int32(b&0x7F) << shift 3208 if b < 0x80 { 3209 break 3210 } 3211 } 3212 case 4: 3213 if wireType != 2 { 3214 return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) 3215 } 3216 var msglen int 3217 for shift := uint(0); ; shift += 7 { 3218 if shift >= 64 { 3219 return ErrIntOverflowTypes 3220 } 3221 if iNdEx >= l { 3222 return io.ErrUnexpectedEOF 3223 } 3224 b := dAtA[iNdEx] 3225 iNdEx++ 3226 msglen |= int(b&0x7F) << shift 3227 if b < 0x80 { 3228 break 3229 } 3230 } 3231 if msglen < 0 { 3232 return ErrInvalidLengthTypes 3233 } 3234 postIndex := iNdEx + msglen 3235 if postIndex < 0 { 3236 return ErrInvalidLengthTypes 3237 } 3238 if postIndex > l { 3239 return io.ErrUnexpectedEOF 3240 } 3241 if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3242 return err 3243 } 3244 iNdEx = postIndex 3245 case 5: 3246 if wireType != 2 { 3247 return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) 3248 } 3249 var msglen int 3250 for shift := uint(0); ; shift += 7 { 3251 if shift >= 64 { 3252 return ErrIntOverflowTypes 3253 } 3254 if iNdEx >= l { 3255 return io.ErrUnexpectedEOF 3256 } 3257 b := dAtA[iNdEx] 3258 iNdEx++ 3259 msglen |= int(b&0x7F) << shift 3260 if b < 0x80 { 3261 break 3262 } 3263 } 3264 if msglen < 0 { 3265 return ErrInvalidLengthTypes 3266 } 3267 postIndex := iNdEx + msglen 3268 if postIndex < 0 { 3269 return ErrInvalidLengthTypes 3270 } 3271 if postIndex > l { 3272 return io.ErrUnexpectedEOF 3273 } 3274 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { 3275 return err 3276 } 3277 iNdEx = postIndex 3278 case 6: 3279 if wireType != 2 { 3280 return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) 3281 } 3282 var byteLen 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 byteLen |= int(b&0x7F) << shift 3293 if b < 0x80 { 3294 break 3295 } 3296 } 3297 if byteLen < 0 { 3298 return ErrInvalidLengthTypes 3299 } 3300 postIndex := iNdEx + byteLen 3301 if postIndex < 0 { 3302 return ErrInvalidLengthTypes 3303 } 3304 if postIndex > l { 3305 return io.ErrUnexpectedEOF 3306 } 3307 m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) 3308 if m.ValidatorAddress == nil { 3309 m.ValidatorAddress = []byte{} 3310 } 3311 iNdEx = postIndex 3312 case 7: 3313 if wireType != 0 { 3314 return fmt.Errorf("proto: wrong wireType = %d for field ValidatorIndex", wireType) 3315 } 3316 m.ValidatorIndex = 0 3317 for shift := uint(0); ; shift += 7 { 3318 if shift >= 64 { 3319 return ErrIntOverflowTypes 3320 } 3321 if iNdEx >= l { 3322 return io.ErrUnexpectedEOF 3323 } 3324 b := dAtA[iNdEx] 3325 iNdEx++ 3326 m.ValidatorIndex |= int32(b&0x7F) << shift 3327 if b < 0x80 { 3328 break 3329 } 3330 } 3331 case 8: 3332 if wireType != 2 { 3333 return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) 3334 } 3335 var byteLen int 3336 for shift := uint(0); ; shift += 7 { 3337 if shift >= 64 { 3338 return ErrIntOverflowTypes 3339 } 3340 if iNdEx >= l { 3341 return io.ErrUnexpectedEOF 3342 } 3343 b := dAtA[iNdEx] 3344 iNdEx++ 3345 byteLen |= int(b&0x7F) << shift 3346 if b < 0x80 { 3347 break 3348 } 3349 } 3350 if byteLen < 0 { 3351 return ErrInvalidLengthTypes 3352 } 3353 postIndex := iNdEx + byteLen 3354 if postIndex < 0 { 3355 return ErrInvalidLengthTypes 3356 } 3357 if postIndex > l { 3358 return io.ErrUnexpectedEOF 3359 } 3360 m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) 3361 if m.Signature == nil { 3362 m.Signature = []byte{} 3363 } 3364 iNdEx = postIndex 3365 default: 3366 iNdEx = preIndex 3367 skippy, err := skipTypes(dAtA[iNdEx:]) 3368 if err != nil { 3369 return err 3370 } 3371 if (skippy < 0) || (iNdEx+skippy) < 0 { 3372 return ErrInvalidLengthTypes 3373 } 3374 if (iNdEx + skippy) > l { 3375 return io.ErrUnexpectedEOF 3376 } 3377 iNdEx += skippy 3378 } 3379 } 3380 3381 if iNdEx > l { 3382 return io.ErrUnexpectedEOF 3383 } 3384 return nil 3385 } 3386 func (m *Commit) Unmarshal(dAtA []byte) error { 3387 l := len(dAtA) 3388 iNdEx := 0 3389 for iNdEx < l { 3390 preIndex := iNdEx 3391 var wire uint64 3392 for shift := uint(0); ; shift += 7 { 3393 if shift >= 64 { 3394 return ErrIntOverflowTypes 3395 } 3396 if iNdEx >= l { 3397 return io.ErrUnexpectedEOF 3398 } 3399 b := dAtA[iNdEx] 3400 iNdEx++ 3401 wire |= uint64(b&0x7F) << shift 3402 if b < 0x80 { 3403 break 3404 } 3405 } 3406 fieldNum := int32(wire >> 3) 3407 wireType := int(wire & 0x7) 3408 if wireType == 4 { 3409 return fmt.Errorf("proto: Commit: wiretype end group for non-group") 3410 } 3411 if fieldNum <= 0 { 3412 return fmt.Errorf("proto: Commit: illegal tag %d (wire type %d)", fieldNum, wire) 3413 } 3414 switch fieldNum { 3415 case 1: 3416 if wireType != 0 { 3417 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 3418 } 3419 m.Height = 0 3420 for shift := uint(0); ; shift += 7 { 3421 if shift >= 64 { 3422 return ErrIntOverflowTypes 3423 } 3424 if iNdEx >= l { 3425 return io.ErrUnexpectedEOF 3426 } 3427 b := dAtA[iNdEx] 3428 iNdEx++ 3429 m.Height |= int64(b&0x7F) << shift 3430 if b < 0x80 { 3431 break 3432 } 3433 } 3434 case 2: 3435 if wireType != 0 { 3436 return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) 3437 } 3438 m.Round = 0 3439 for shift := uint(0); ; shift += 7 { 3440 if shift >= 64 { 3441 return ErrIntOverflowTypes 3442 } 3443 if iNdEx >= l { 3444 return io.ErrUnexpectedEOF 3445 } 3446 b := dAtA[iNdEx] 3447 iNdEx++ 3448 m.Round |= int32(b&0x7F) << shift 3449 if b < 0x80 { 3450 break 3451 } 3452 } 3453 case 3: 3454 if wireType != 2 { 3455 return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) 3456 } 3457 var msglen int 3458 for shift := uint(0); ; shift += 7 { 3459 if shift >= 64 { 3460 return ErrIntOverflowTypes 3461 } 3462 if iNdEx >= l { 3463 return io.ErrUnexpectedEOF 3464 } 3465 b := dAtA[iNdEx] 3466 iNdEx++ 3467 msglen |= int(b&0x7F) << shift 3468 if b < 0x80 { 3469 break 3470 } 3471 } 3472 if msglen < 0 { 3473 return ErrInvalidLengthTypes 3474 } 3475 postIndex := iNdEx + msglen 3476 if postIndex < 0 { 3477 return ErrInvalidLengthTypes 3478 } 3479 if postIndex > l { 3480 return io.ErrUnexpectedEOF 3481 } 3482 if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3483 return err 3484 } 3485 iNdEx = postIndex 3486 case 4: 3487 if wireType != 2 { 3488 return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) 3489 } 3490 var msglen int 3491 for shift := uint(0); ; shift += 7 { 3492 if shift >= 64 { 3493 return ErrIntOverflowTypes 3494 } 3495 if iNdEx >= l { 3496 return io.ErrUnexpectedEOF 3497 } 3498 b := dAtA[iNdEx] 3499 iNdEx++ 3500 msglen |= int(b&0x7F) << shift 3501 if b < 0x80 { 3502 break 3503 } 3504 } 3505 if msglen < 0 { 3506 return ErrInvalidLengthTypes 3507 } 3508 postIndex := iNdEx + msglen 3509 if postIndex < 0 { 3510 return ErrInvalidLengthTypes 3511 } 3512 if postIndex > l { 3513 return io.ErrUnexpectedEOF 3514 } 3515 m.Signatures = append(m.Signatures, CommitSig{}) 3516 if err := m.Signatures[len(m.Signatures)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3517 return err 3518 } 3519 iNdEx = postIndex 3520 default: 3521 iNdEx = preIndex 3522 skippy, err := skipTypes(dAtA[iNdEx:]) 3523 if err != nil { 3524 return err 3525 } 3526 if (skippy < 0) || (iNdEx+skippy) < 0 { 3527 return ErrInvalidLengthTypes 3528 } 3529 if (iNdEx + skippy) > l { 3530 return io.ErrUnexpectedEOF 3531 } 3532 iNdEx += skippy 3533 } 3534 } 3535 3536 if iNdEx > l { 3537 return io.ErrUnexpectedEOF 3538 } 3539 return nil 3540 } 3541 func (m *CommitSig) Unmarshal(dAtA []byte) error { 3542 l := len(dAtA) 3543 iNdEx := 0 3544 for iNdEx < l { 3545 preIndex := iNdEx 3546 var wire uint64 3547 for shift := uint(0); ; shift += 7 { 3548 if shift >= 64 { 3549 return ErrIntOverflowTypes 3550 } 3551 if iNdEx >= l { 3552 return io.ErrUnexpectedEOF 3553 } 3554 b := dAtA[iNdEx] 3555 iNdEx++ 3556 wire |= uint64(b&0x7F) << shift 3557 if b < 0x80 { 3558 break 3559 } 3560 } 3561 fieldNum := int32(wire >> 3) 3562 wireType := int(wire & 0x7) 3563 if wireType == 4 { 3564 return fmt.Errorf("proto: CommitSig: wiretype end group for non-group") 3565 } 3566 if fieldNum <= 0 { 3567 return fmt.Errorf("proto: CommitSig: illegal tag %d (wire type %d)", fieldNum, wire) 3568 } 3569 switch fieldNum { 3570 case 1: 3571 if wireType != 0 { 3572 return fmt.Errorf("proto: wrong wireType = %d for field BlockIdFlag", wireType) 3573 } 3574 m.BlockIdFlag = 0 3575 for shift := uint(0); ; shift += 7 { 3576 if shift >= 64 { 3577 return ErrIntOverflowTypes 3578 } 3579 if iNdEx >= l { 3580 return io.ErrUnexpectedEOF 3581 } 3582 b := dAtA[iNdEx] 3583 iNdEx++ 3584 m.BlockIdFlag |= BlockIDFlag(b&0x7F) << shift 3585 if b < 0x80 { 3586 break 3587 } 3588 } 3589 case 2: 3590 if wireType != 2 { 3591 return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) 3592 } 3593 var byteLen int 3594 for shift := uint(0); ; shift += 7 { 3595 if shift >= 64 { 3596 return ErrIntOverflowTypes 3597 } 3598 if iNdEx >= l { 3599 return io.ErrUnexpectedEOF 3600 } 3601 b := dAtA[iNdEx] 3602 iNdEx++ 3603 byteLen |= int(b&0x7F) << shift 3604 if b < 0x80 { 3605 break 3606 } 3607 } 3608 if byteLen < 0 { 3609 return ErrInvalidLengthTypes 3610 } 3611 postIndex := iNdEx + byteLen 3612 if postIndex < 0 { 3613 return ErrInvalidLengthTypes 3614 } 3615 if postIndex > l { 3616 return io.ErrUnexpectedEOF 3617 } 3618 m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) 3619 if m.ValidatorAddress == nil { 3620 m.ValidatorAddress = []byte{} 3621 } 3622 iNdEx = postIndex 3623 case 3: 3624 if wireType != 2 { 3625 return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) 3626 } 3627 var msglen int 3628 for shift := uint(0); ; shift += 7 { 3629 if shift >= 64 { 3630 return ErrIntOverflowTypes 3631 } 3632 if iNdEx >= l { 3633 return io.ErrUnexpectedEOF 3634 } 3635 b := dAtA[iNdEx] 3636 iNdEx++ 3637 msglen |= int(b&0x7F) << shift 3638 if b < 0x80 { 3639 break 3640 } 3641 } 3642 if msglen < 0 { 3643 return ErrInvalidLengthTypes 3644 } 3645 postIndex := iNdEx + msglen 3646 if postIndex < 0 { 3647 return ErrInvalidLengthTypes 3648 } 3649 if postIndex > l { 3650 return io.ErrUnexpectedEOF 3651 } 3652 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { 3653 return err 3654 } 3655 iNdEx = postIndex 3656 case 4: 3657 if wireType != 2 { 3658 return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) 3659 } 3660 var byteLen int 3661 for shift := uint(0); ; shift += 7 { 3662 if shift >= 64 { 3663 return ErrIntOverflowTypes 3664 } 3665 if iNdEx >= l { 3666 return io.ErrUnexpectedEOF 3667 } 3668 b := dAtA[iNdEx] 3669 iNdEx++ 3670 byteLen |= int(b&0x7F) << shift 3671 if b < 0x80 { 3672 break 3673 } 3674 } 3675 if byteLen < 0 { 3676 return ErrInvalidLengthTypes 3677 } 3678 postIndex := iNdEx + byteLen 3679 if postIndex < 0 { 3680 return ErrInvalidLengthTypes 3681 } 3682 if postIndex > l { 3683 return io.ErrUnexpectedEOF 3684 } 3685 m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) 3686 if m.Signature == nil { 3687 m.Signature = []byte{} 3688 } 3689 iNdEx = postIndex 3690 default: 3691 iNdEx = preIndex 3692 skippy, err := skipTypes(dAtA[iNdEx:]) 3693 if err != nil { 3694 return err 3695 } 3696 if (skippy < 0) || (iNdEx+skippy) < 0 { 3697 return ErrInvalidLengthTypes 3698 } 3699 if (iNdEx + skippy) > l { 3700 return io.ErrUnexpectedEOF 3701 } 3702 iNdEx += skippy 3703 } 3704 } 3705 3706 if iNdEx > l { 3707 return io.ErrUnexpectedEOF 3708 } 3709 return nil 3710 } 3711 func (m *Proposal) Unmarshal(dAtA []byte) error { 3712 l := len(dAtA) 3713 iNdEx := 0 3714 for iNdEx < l { 3715 preIndex := iNdEx 3716 var wire uint64 3717 for shift := uint(0); ; shift += 7 { 3718 if shift >= 64 { 3719 return ErrIntOverflowTypes 3720 } 3721 if iNdEx >= l { 3722 return io.ErrUnexpectedEOF 3723 } 3724 b := dAtA[iNdEx] 3725 iNdEx++ 3726 wire |= uint64(b&0x7F) << shift 3727 if b < 0x80 { 3728 break 3729 } 3730 } 3731 fieldNum := int32(wire >> 3) 3732 wireType := int(wire & 0x7) 3733 if wireType == 4 { 3734 return fmt.Errorf("proto: Proposal: wiretype end group for non-group") 3735 } 3736 if fieldNum <= 0 { 3737 return fmt.Errorf("proto: Proposal: illegal tag %d (wire type %d)", fieldNum, wire) 3738 } 3739 switch fieldNum { 3740 case 1: 3741 if wireType != 0 { 3742 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 3743 } 3744 m.Type = 0 3745 for shift := uint(0); ; shift += 7 { 3746 if shift >= 64 { 3747 return ErrIntOverflowTypes 3748 } 3749 if iNdEx >= l { 3750 return io.ErrUnexpectedEOF 3751 } 3752 b := dAtA[iNdEx] 3753 iNdEx++ 3754 m.Type |= SignedMsgType(b&0x7F) << shift 3755 if b < 0x80 { 3756 break 3757 } 3758 } 3759 case 2: 3760 if wireType != 0 { 3761 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 3762 } 3763 m.Height = 0 3764 for shift := uint(0); ; shift += 7 { 3765 if shift >= 64 { 3766 return ErrIntOverflowTypes 3767 } 3768 if iNdEx >= l { 3769 return io.ErrUnexpectedEOF 3770 } 3771 b := dAtA[iNdEx] 3772 iNdEx++ 3773 m.Height |= int64(b&0x7F) << shift 3774 if b < 0x80 { 3775 break 3776 } 3777 } 3778 case 3: 3779 if wireType != 0 { 3780 return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) 3781 } 3782 m.Round = 0 3783 for shift := uint(0); ; shift += 7 { 3784 if shift >= 64 { 3785 return ErrIntOverflowTypes 3786 } 3787 if iNdEx >= l { 3788 return io.ErrUnexpectedEOF 3789 } 3790 b := dAtA[iNdEx] 3791 iNdEx++ 3792 m.Round |= int32(b&0x7F) << shift 3793 if b < 0x80 { 3794 break 3795 } 3796 } 3797 case 4: 3798 if wireType != 0 { 3799 return fmt.Errorf("proto: wrong wireType = %d for field PolRound", wireType) 3800 } 3801 m.PolRound = 0 3802 for shift := uint(0); ; shift += 7 { 3803 if shift >= 64 { 3804 return ErrIntOverflowTypes 3805 } 3806 if iNdEx >= l { 3807 return io.ErrUnexpectedEOF 3808 } 3809 b := dAtA[iNdEx] 3810 iNdEx++ 3811 m.PolRound |= int32(b&0x7F) << shift 3812 if b < 0x80 { 3813 break 3814 } 3815 } 3816 case 5: 3817 if wireType != 2 { 3818 return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) 3819 } 3820 var msglen int 3821 for shift := uint(0); ; shift += 7 { 3822 if shift >= 64 { 3823 return ErrIntOverflowTypes 3824 } 3825 if iNdEx >= l { 3826 return io.ErrUnexpectedEOF 3827 } 3828 b := dAtA[iNdEx] 3829 iNdEx++ 3830 msglen |= int(b&0x7F) << shift 3831 if b < 0x80 { 3832 break 3833 } 3834 } 3835 if msglen < 0 { 3836 return ErrInvalidLengthTypes 3837 } 3838 postIndex := iNdEx + msglen 3839 if postIndex < 0 { 3840 return ErrInvalidLengthTypes 3841 } 3842 if postIndex > l { 3843 return io.ErrUnexpectedEOF 3844 } 3845 if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3846 return err 3847 } 3848 iNdEx = postIndex 3849 case 6: 3850 if wireType != 2 { 3851 return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) 3852 } 3853 var msglen int 3854 for shift := uint(0); ; shift += 7 { 3855 if shift >= 64 { 3856 return ErrIntOverflowTypes 3857 } 3858 if iNdEx >= l { 3859 return io.ErrUnexpectedEOF 3860 } 3861 b := dAtA[iNdEx] 3862 iNdEx++ 3863 msglen |= int(b&0x7F) << shift 3864 if b < 0x80 { 3865 break 3866 } 3867 } 3868 if msglen < 0 { 3869 return ErrInvalidLengthTypes 3870 } 3871 postIndex := iNdEx + msglen 3872 if postIndex < 0 { 3873 return ErrInvalidLengthTypes 3874 } 3875 if postIndex > l { 3876 return io.ErrUnexpectedEOF 3877 } 3878 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { 3879 return err 3880 } 3881 iNdEx = postIndex 3882 case 7: 3883 if wireType != 2 { 3884 return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) 3885 } 3886 var byteLen int 3887 for shift := uint(0); ; shift += 7 { 3888 if shift >= 64 { 3889 return ErrIntOverflowTypes 3890 } 3891 if iNdEx >= l { 3892 return io.ErrUnexpectedEOF 3893 } 3894 b := dAtA[iNdEx] 3895 iNdEx++ 3896 byteLen |= int(b&0x7F) << shift 3897 if b < 0x80 { 3898 break 3899 } 3900 } 3901 if byteLen < 0 { 3902 return ErrInvalidLengthTypes 3903 } 3904 postIndex := iNdEx + byteLen 3905 if postIndex < 0 { 3906 return ErrInvalidLengthTypes 3907 } 3908 if postIndex > l { 3909 return io.ErrUnexpectedEOF 3910 } 3911 m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) 3912 if m.Signature == nil { 3913 m.Signature = []byte{} 3914 } 3915 iNdEx = postIndex 3916 default: 3917 iNdEx = preIndex 3918 skippy, err := skipTypes(dAtA[iNdEx:]) 3919 if err != nil { 3920 return err 3921 } 3922 if (skippy < 0) || (iNdEx+skippy) < 0 { 3923 return ErrInvalidLengthTypes 3924 } 3925 if (iNdEx + skippy) > l { 3926 return io.ErrUnexpectedEOF 3927 } 3928 iNdEx += skippy 3929 } 3930 } 3931 3932 if iNdEx > l { 3933 return io.ErrUnexpectedEOF 3934 } 3935 return nil 3936 } 3937 func (m *SignedHeader) Unmarshal(dAtA []byte) error { 3938 l := len(dAtA) 3939 iNdEx := 0 3940 for iNdEx < l { 3941 preIndex := iNdEx 3942 var wire uint64 3943 for shift := uint(0); ; shift += 7 { 3944 if shift >= 64 { 3945 return ErrIntOverflowTypes 3946 } 3947 if iNdEx >= l { 3948 return io.ErrUnexpectedEOF 3949 } 3950 b := dAtA[iNdEx] 3951 iNdEx++ 3952 wire |= uint64(b&0x7F) << shift 3953 if b < 0x80 { 3954 break 3955 } 3956 } 3957 fieldNum := int32(wire >> 3) 3958 wireType := int(wire & 0x7) 3959 if wireType == 4 { 3960 return fmt.Errorf("proto: SignedHeader: wiretype end group for non-group") 3961 } 3962 if fieldNum <= 0 { 3963 return fmt.Errorf("proto: SignedHeader: illegal tag %d (wire type %d)", fieldNum, wire) 3964 } 3965 switch fieldNum { 3966 case 1: 3967 if wireType != 2 { 3968 return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) 3969 } 3970 var msglen int 3971 for shift := uint(0); ; shift += 7 { 3972 if shift >= 64 { 3973 return ErrIntOverflowTypes 3974 } 3975 if iNdEx >= l { 3976 return io.ErrUnexpectedEOF 3977 } 3978 b := dAtA[iNdEx] 3979 iNdEx++ 3980 msglen |= int(b&0x7F) << shift 3981 if b < 0x80 { 3982 break 3983 } 3984 } 3985 if msglen < 0 { 3986 return ErrInvalidLengthTypes 3987 } 3988 postIndex := iNdEx + msglen 3989 if postIndex < 0 { 3990 return ErrInvalidLengthTypes 3991 } 3992 if postIndex > l { 3993 return io.ErrUnexpectedEOF 3994 } 3995 if m.Header == nil { 3996 m.Header = &Header{} 3997 } 3998 if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3999 return err 4000 } 4001 iNdEx = postIndex 4002 case 2: 4003 if wireType != 2 { 4004 return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType) 4005 } 4006 var msglen int 4007 for shift := uint(0); ; shift += 7 { 4008 if shift >= 64 { 4009 return ErrIntOverflowTypes 4010 } 4011 if iNdEx >= l { 4012 return io.ErrUnexpectedEOF 4013 } 4014 b := dAtA[iNdEx] 4015 iNdEx++ 4016 msglen |= int(b&0x7F) << shift 4017 if b < 0x80 { 4018 break 4019 } 4020 } 4021 if msglen < 0 { 4022 return ErrInvalidLengthTypes 4023 } 4024 postIndex := iNdEx + msglen 4025 if postIndex < 0 { 4026 return ErrInvalidLengthTypes 4027 } 4028 if postIndex > l { 4029 return io.ErrUnexpectedEOF 4030 } 4031 if m.Commit == nil { 4032 m.Commit = &Commit{} 4033 } 4034 if err := m.Commit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4035 return err 4036 } 4037 iNdEx = postIndex 4038 default: 4039 iNdEx = preIndex 4040 skippy, err := skipTypes(dAtA[iNdEx:]) 4041 if err != nil { 4042 return err 4043 } 4044 if (skippy < 0) || (iNdEx+skippy) < 0 { 4045 return ErrInvalidLengthTypes 4046 } 4047 if (iNdEx + skippy) > l { 4048 return io.ErrUnexpectedEOF 4049 } 4050 iNdEx += skippy 4051 } 4052 } 4053 4054 if iNdEx > l { 4055 return io.ErrUnexpectedEOF 4056 } 4057 return nil 4058 } 4059 func (m *LightBlock) Unmarshal(dAtA []byte) error { 4060 l := len(dAtA) 4061 iNdEx := 0 4062 for iNdEx < l { 4063 preIndex := iNdEx 4064 var wire uint64 4065 for shift := uint(0); ; shift += 7 { 4066 if shift >= 64 { 4067 return ErrIntOverflowTypes 4068 } 4069 if iNdEx >= l { 4070 return io.ErrUnexpectedEOF 4071 } 4072 b := dAtA[iNdEx] 4073 iNdEx++ 4074 wire |= uint64(b&0x7F) << shift 4075 if b < 0x80 { 4076 break 4077 } 4078 } 4079 fieldNum := int32(wire >> 3) 4080 wireType := int(wire & 0x7) 4081 if wireType == 4 { 4082 return fmt.Errorf("proto: LightBlock: wiretype end group for non-group") 4083 } 4084 if fieldNum <= 0 { 4085 return fmt.Errorf("proto: LightBlock: illegal tag %d (wire type %d)", fieldNum, wire) 4086 } 4087 switch fieldNum { 4088 case 1: 4089 if wireType != 2 { 4090 return fmt.Errorf("proto: wrong wireType = %d for field SignedHeader", wireType) 4091 } 4092 var msglen int 4093 for shift := uint(0); ; shift += 7 { 4094 if shift >= 64 { 4095 return ErrIntOverflowTypes 4096 } 4097 if iNdEx >= l { 4098 return io.ErrUnexpectedEOF 4099 } 4100 b := dAtA[iNdEx] 4101 iNdEx++ 4102 msglen |= int(b&0x7F) << shift 4103 if b < 0x80 { 4104 break 4105 } 4106 } 4107 if msglen < 0 { 4108 return ErrInvalidLengthTypes 4109 } 4110 postIndex := iNdEx + msglen 4111 if postIndex < 0 { 4112 return ErrInvalidLengthTypes 4113 } 4114 if postIndex > l { 4115 return io.ErrUnexpectedEOF 4116 } 4117 if m.SignedHeader == nil { 4118 m.SignedHeader = &SignedHeader{} 4119 } 4120 if err := m.SignedHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4121 return err 4122 } 4123 iNdEx = postIndex 4124 case 2: 4125 if wireType != 2 { 4126 return fmt.Errorf("proto: wrong wireType = %d for field ValidatorSet", wireType) 4127 } 4128 var msglen int 4129 for shift := uint(0); ; shift += 7 { 4130 if shift >= 64 { 4131 return ErrIntOverflowTypes 4132 } 4133 if iNdEx >= l { 4134 return io.ErrUnexpectedEOF 4135 } 4136 b := dAtA[iNdEx] 4137 iNdEx++ 4138 msglen |= int(b&0x7F) << shift 4139 if b < 0x80 { 4140 break 4141 } 4142 } 4143 if msglen < 0 { 4144 return ErrInvalidLengthTypes 4145 } 4146 postIndex := iNdEx + msglen 4147 if postIndex < 0 { 4148 return ErrInvalidLengthTypes 4149 } 4150 if postIndex > l { 4151 return io.ErrUnexpectedEOF 4152 } 4153 if m.ValidatorSet == nil { 4154 m.ValidatorSet = &ValidatorSet{} 4155 } 4156 if err := m.ValidatorSet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4157 return err 4158 } 4159 iNdEx = postIndex 4160 default: 4161 iNdEx = preIndex 4162 skippy, err := skipTypes(dAtA[iNdEx:]) 4163 if err != nil { 4164 return err 4165 } 4166 if (skippy < 0) || (iNdEx+skippy) < 0 { 4167 return ErrInvalidLengthTypes 4168 } 4169 if (iNdEx + skippy) > l { 4170 return io.ErrUnexpectedEOF 4171 } 4172 iNdEx += skippy 4173 } 4174 } 4175 4176 if iNdEx > l { 4177 return io.ErrUnexpectedEOF 4178 } 4179 return nil 4180 } 4181 func (m *BlockMeta) Unmarshal(dAtA []byte) error { 4182 l := len(dAtA) 4183 iNdEx := 0 4184 for iNdEx < l { 4185 preIndex := iNdEx 4186 var wire uint64 4187 for shift := uint(0); ; shift += 7 { 4188 if shift >= 64 { 4189 return ErrIntOverflowTypes 4190 } 4191 if iNdEx >= l { 4192 return io.ErrUnexpectedEOF 4193 } 4194 b := dAtA[iNdEx] 4195 iNdEx++ 4196 wire |= uint64(b&0x7F) << shift 4197 if b < 0x80 { 4198 break 4199 } 4200 } 4201 fieldNum := int32(wire >> 3) 4202 wireType := int(wire & 0x7) 4203 if wireType == 4 { 4204 return fmt.Errorf("proto: BlockMeta: wiretype end group for non-group") 4205 } 4206 if fieldNum <= 0 { 4207 return fmt.Errorf("proto: BlockMeta: illegal tag %d (wire type %d)", fieldNum, wire) 4208 } 4209 switch fieldNum { 4210 case 1: 4211 if wireType != 2 { 4212 return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) 4213 } 4214 var msglen int 4215 for shift := uint(0); ; shift += 7 { 4216 if shift >= 64 { 4217 return ErrIntOverflowTypes 4218 } 4219 if iNdEx >= l { 4220 return io.ErrUnexpectedEOF 4221 } 4222 b := dAtA[iNdEx] 4223 iNdEx++ 4224 msglen |= int(b&0x7F) << shift 4225 if b < 0x80 { 4226 break 4227 } 4228 } 4229 if msglen < 0 { 4230 return ErrInvalidLengthTypes 4231 } 4232 postIndex := iNdEx + msglen 4233 if postIndex < 0 { 4234 return ErrInvalidLengthTypes 4235 } 4236 if postIndex > l { 4237 return io.ErrUnexpectedEOF 4238 } 4239 if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4240 return err 4241 } 4242 iNdEx = postIndex 4243 case 2: 4244 if wireType != 0 { 4245 return fmt.Errorf("proto: wrong wireType = %d for field BlockSize", wireType) 4246 } 4247 m.BlockSize = 0 4248 for shift := uint(0); ; shift += 7 { 4249 if shift >= 64 { 4250 return ErrIntOverflowTypes 4251 } 4252 if iNdEx >= l { 4253 return io.ErrUnexpectedEOF 4254 } 4255 b := dAtA[iNdEx] 4256 iNdEx++ 4257 m.BlockSize |= int64(b&0x7F) << shift 4258 if b < 0x80 { 4259 break 4260 } 4261 } 4262 case 3: 4263 if wireType != 2 { 4264 return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) 4265 } 4266 var msglen int 4267 for shift := uint(0); ; shift += 7 { 4268 if shift >= 64 { 4269 return ErrIntOverflowTypes 4270 } 4271 if iNdEx >= l { 4272 return io.ErrUnexpectedEOF 4273 } 4274 b := dAtA[iNdEx] 4275 iNdEx++ 4276 msglen |= int(b&0x7F) << shift 4277 if b < 0x80 { 4278 break 4279 } 4280 } 4281 if msglen < 0 { 4282 return ErrInvalidLengthTypes 4283 } 4284 postIndex := iNdEx + msglen 4285 if postIndex < 0 { 4286 return ErrInvalidLengthTypes 4287 } 4288 if postIndex > l { 4289 return io.ErrUnexpectedEOF 4290 } 4291 if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4292 return err 4293 } 4294 iNdEx = postIndex 4295 case 4: 4296 if wireType != 0 { 4297 return fmt.Errorf("proto: wrong wireType = %d for field NumTxs", wireType) 4298 } 4299 m.NumTxs = 0 4300 for shift := uint(0); ; shift += 7 { 4301 if shift >= 64 { 4302 return ErrIntOverflowTypes 4303 } 4304 if iNdEx >= l { 4305 return io.ErrUnexpectedEOF 4306 } 4307 b := dAtA[iNdEx] 4308 iNdEx++ 4309 m.NumTxs |= int64(b&0x7F) << shift 4310 if b < 0x80 { 4311 break 4312 } 4313 } 4314 default: 4315 iNdEx = preIndex 4316 skippy, err := skipTypes(dAtA[iNdEx:]) 4317 if err != nil { 4318 return err 4319 } 4320 if (skippy < 0) || (iNdEx+skippy) < 0 { 4321 return ErrInvalidLengthTypes 4322 } 4323 if (iNdEx + skippy) > l { 4324 return io.ErrUnexpectedEOF 4325 } 4326 iNdEx += skippy 4327 } 4328 } 4329 4330 if iNdEx > l { 4331 return io.ErrUnexpectedEOF 4332 } 4333 return nil 4334 } 4335 func (m *TxProof) Unmarshal(dAtA []byte) error { 4336 l := len(dAtA) 4337 iNdEx := 0 4338 for iNdEx < l { 4339 preIndex := iNdEx 4340 var wire uint64 4341 for shift := uint(0); ; shift += 7 { 4342 if shift >= 64 { 4343 return ErrIntOverflowTypes 4344 } 4345 if iNdEx >= l { 4346 return io.ErrUnexpectedEOF 4347 } 4348 b := dAtA[iNdEx] 4349 iNdEx++ 4350 wire |= uint64(b&0x7F) << shift 4351 if b < 0x80 { 4352 break 4353 } 4354 } 4355 fieldNum := int32(wire >> 3) 4356 wireType := int(wire & 0x7) 4357 if wireType == 4 { 4358 return fmt.Errorf("proto: TxProof: wiretype end group for non-group") 4359 } 4360 if fieldNum <= 0 { 4361 return fmt.Errorf("proto: TxProof: illegal tag %d (wire type %d)", fieldNum, wire) 4362 } 4363 switch fieldNum { 4364 case 1: 4365 if wireType != 2 { 4366 return fmt.Errorf("proto: wrong wireType = %d for field RootHash", wireType) 4367 } 4368 var byteLen int 4369 for shift := uint(0); ; shift += 7 { 4370 if shift >= 64 { 4371 return ErrIntOverflowTypes 4372 } 4373 if iNdEx >= l { 4374 return io.ErrUnexpectedEOF 4375 } 4376 b := dAtA[iNdEx] 4377 iNdEx++ 4378 byteLen |= int(b&0x7F) << shift 4379 if b < 0x80 { 4380 break 4381 } 4382 } 4383 if byteLen < 0 { 4384 return ErrInvalidLengthTypes 4385 } 4386 postIndex := iNdEx + byteLen 4387 if postIndex < 0 { 4388 return ErrInvalidLengthTypes 4389 } 4390 if postIndex > l { 4391 return io.ErrUnexpectedEOF 4392 } 4393 m.RootHash = append(m.RootHash[:0], dAtA[iNdEx:postIndex]...) 4394 if m.RootHash == nil { 4395 m.RootHash = []byte{} 4396 } 4397 iNdEx = postIndex 4398 case 2: 4399 if wireType != 2 { 4400 return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) 4401 } 4402 var byteLen int 4403 for shift := uint(0); ; shift += 7 { 4404 if shift >= 64 { 4405 return ErrIntOverflowTypes 4406 } 4407 if iNdEx >= l { 4408 return io.ErrUnexpectedEOF 4409 } 4410 b := dAtA[iNdEx] 4411 iNdEx++ 4412 byteLen |= int(b&0x7F) << shift 4413 if b < 0x80 { 4414 break 4415 } 4416 } 4417 if byteLen < 0 { 4418 return ErrInvalidLengthTypes 4419 } 4420 postIndex := iNdEx + byteLen 4421 if postIndex < 0 { 4422 return ErrInvalidLengthTypes 4423 } 4424 if postIndex > l { 4425 return io.ErrUnexpectedEOF 4426 } 4427 m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) 4428 if m.Data == nil { 4429 m.Data = []byte{} 4430 } 4431 iNdEx = postIndex 4432 case 3: 4433 if wireType != 2 { 4434 return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) 4435 } 4436 var msglen int 4437 for shift := uint(0); ; shift += 7 { 4438 if shift >= 64 { 4439 return ErrIntOverflowTypes 4440 } 4441 if iNdEx >= l { 4442 return io.ErrUnexpectedEOF 4443 } 4444 b := dAtA[iNdEx] 4445 iNdEx++ 4446 msglen |= int(b&0x7F) << shift 4447 if b < 0x80 { 4448 break 4449 } 4450 } 4451 if msglen < 0 { 4452 return ErrInvalidLengthTypes 4453 } 4454 postIndex := iNdEx + msglen 4455 if postIndex < 0 { 4456 return ErrInvalidLengthTypes 4457 } 4458 if postIndex > l { 4459 return io.ErrUnexpectedEOF 4460 } 4461 if m.Proof == nil { 4462 m.Proof = &crypto.Proof{} 4463 } 4464 if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4465 return err 4466 } 4467 iNdEx = postIndex 4468 default: 4469 iNdEx = preIndex 4470 skippy, err := skipTypes(dAtA[iNdEx:]) 4471 if err != nil { 4472 return err 4473 } 4474 if (skippy < 0) || (iNdEx+skippy) < 0 { 4475 return ErrInvalidLengthTypes 4476 } 4477 if (iNdEx + skippy) > l { 4478 return io.ErrUnexpectedEOF 4479 } 4480 iNdEx += skippy 4481 } 4482 } 4483 4484 if iNdEx > l { 4485 return io.ErrUnexpectedEOF 4486 } 4487 return nil 4488 } 4489 func skipTypes(dAtA []byte) (n int, err error) { 4490 l := len(dAtA) 4491 iNdEx := 0 4492 depth := 0 4493 for iNdEx < l { 4494 var wire uint64 4495 for shift := uint(0); ; shift += 7 { 4496 if shift >= 64 { 4497 return 0, ErrIntOverflowTypes 4498 } 4499 if iNdEx >= l { 4500 return 0, io.ErrUnexpectedEOF 4501 } 4502 b := dAtA[iNdEx] 4503 iNdEx++ 4504 wire |= (uint64(b) & 0x7F) << shift 4505 if b < 0x80 { 4506 break 4507 } 4508 } 4509 wireType := int(wire & 0x7) 4510 switch wireType { 4511 case 0: 4512 for shift := uint(0); ; shift += 7 { 4513 if shift >= 64 { 4514 return 0, ErrIntOverflowTypes 4515 } 4516 if iNdEx >= l { 4517 return 0, io.ErrUnexpectedEOF 4518 } 4519 iNdEx++ 4520 if dAtA[iNdEx-1] < 0x80 { 4521 break 4522 } 4523 } 4524 case 1: 4525 iNdEx += 8 4526 case 2: 4527 var length int 4528 for shift := uint(0); ; shift += 7 { 4529 if shift >= 64 { 4530 return 0, ErrIntOverflowTypes 4531 } 4532 if iNdEx >= l { 4533 return 0, io.ErrUnexpectedEOF 4534 } 4535 b := dAtA[iNdEx] 4536 iNdEx++ 4537 length |= (int(b) & 0x7F) << shift 4538 if b < 0x80 { 4539 break 4540 } 4541 } 4542 if length < 0 { 4543 return 0, ErrInvalidLengthTypes 4544 } 4545 iNdEx += length 4546 case 3: 4547 depth++ 4548 case 4: 4549 if depth == 0 { 4550 return 0, ErrUnexpectedEndOfGroupTypes 4551 } 4552 depth-- 4553 case 5: 4554 iNdEx += 4 4555 default: 4556 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 4557 } 4558 if iNdEx < 0 { 4559 return 0, ErrInvalidLengthTypes 4560 } 4561 if depth == 0 { 4562 return iNdEx, nil 4563 } 4564 } 4565 return 0, io.ErrUnexpectedEOF 4566 } 4567 4568 var ( 4569 ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") 4570 ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") 4571 ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") 4572 )