// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: proto/types/types.proto package types import ( fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" _ "github.com/golang/protobuf/ptypes/timestamp" merkle "github.com/tendermint/tendermint/proto/crypto/merkle" bits "github.com/tendermint/tendermint/proto/libs/bits" version "github.com/tendermint/tendermint/proto/version" io "io" math "math" math_bits "math/bits" time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // BlockIdFlag indicates which BlcokID the signature is for type BlockIDFlag int32 const ( BLOCKD_ID_FLAG_UNKNOWN BlockIDFlag = 0 BlockIDFlagAbsent BlockIDFlag = 1 BlockIDFlagCommit BlockIDFlag = 2 BlockIDFlagNil BlockIDFlag = 3 ) var BlockIDFlag_name = map[int32]string{ 0: "BLOCKD_ID_FLAG_UNKNOWN", 1: "BLOCK_ID_FLAG_ABSENT", 2: "BLOCK_ID_FLAG_COMMIT", 3: "BLOCK_ID_FLAG_NIL", } var BlockIDFlag_value = map[string]int32{ "BLOCKD_ID_FLAG_UNKNOWN": 0, "BLOCK_ID_FLAG_ABSENT": 1, "BLOCK_ID_FLAG_COMMIT": 2, "BLOCK_ID_FLAG_NIL": 3, } func (BlockIDFlag) EnumDescriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{0} } // SignedMsgType is a type of signed message in the consensus. type SignedMsgType int32 const ( SIGNED_MSG_TYPE_UNKNOWN SignedMsgType = 0 PrevoteType SignedMsgType = 1 PrecommitType SignedMsgType = 2 ProposalType SignedMsgType = 3 ) var SignedMsgType_name = map[int32]string{ 0: "SIGNED_MSG_TYPE_UNKNOWN", 1: "PREVOTE_TYPE", 2: "PRECOMMIT_TYPE", 3: "PROPOSAL_TYPE", } var SignedMsgType_value = map[string]int32{ "SIGNED_MSG_TYPE_UNKNOWN": 0, "PREVOTE_TYPE": 1, "PRECOMMIT_TYPE": 2, "PROPOSAL_TYPE": 3, } func (SignedMsgType) EnumDescriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{1} } // PartsetHeader type PartSetHeader struct { Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` } func (m *PartSetHeader) Reset() { *m = PartSetHeader{} } func (m *PartSetHeader) String() string { return proto.CompactTextString(m) } func (*PartSetHeader) ProtoMessage() {} func (*PartSetHeader) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{0} } func (m *PartSetHeader) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *PartSetHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_PartSetHeader.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *PartSetHeader) XXX_Merge(src proto.Message) { xxx_messageInfo_PartSetHeader.Merge(m, src) } func (m *PartSetHeader) XXX_Size() int { return m.Size() } func (m *PartSetHeader) XXX_DiscardUnknown() { xxx_messageInfo_PartSetHeader.DiscardUnknown(m) } var xxx_messageInfo_PartSetHeader proto.InternalMessageInfo func (m *PartSetHeader) GetTotal() uint32 { if m != nil { return m.Total } return 0 } func (m *PartSetHeader) GetHash() []byte { if m != nil { return m.Hash } return nil } type Part struct { Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` Bytes []byte `protobuf:"bytes,2,opt,name=bytes,proto3" json:"bytes,omitempty"` Proof merkle.SimpleProof `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof"` } func (m *Part) Reset() { *m = Part{} } func (m *Part) String() string { return proto.CompactTextString(m) } func (*Part) ProtoMessage() {} func (*Part) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{1} } func (m *Part) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Part) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Part.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *Part) XXX_Merge(src proto.Message) { xxx_messageInfo_Part.Merge(m, src) } func (m *Part) XXX_Size() int { return m.Size() } func (m *Part) XXX_DiscardUnknown() { xxx_messageInfo_Part.DiscardUnknown(m) } var xxx_messageInfo_Part proto.InternalMessageInfo func (m *Part) GetIndex() uint32 { if m != nil { return m.Index } return 0 } func (m *Part) GetBytes() []byte { if m != nil { return m.Bytes } return nil } func (m *Part) GetProof() merkle.SimpleProof { if m != nil { return m.Proof } return merkle.SimpleProof{} } // BlockID type BlockID struct { Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` PartsHeader PartSetHeader `protobuf:"bytes,2,opt,name=parts_header,json=partsHeader,proto3" json:"parts_header"` } func (m *BlockID) Reset() { *m = BlockID{} } func (m *BlockID) String() string { return proto.CompactTextString(m) } func (*BlockID) ProtoMessage() {} func (*BlockID) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{2} } func (m *BlockID) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *BlockID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_BlockID.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *BlockID) XXX_Merge(src proto.Message) { xxx_messageInfo_BlockID.Merge(m, src) } func (m *BlockID) XXX_Size() int { return m.Size() } func (m *BlockID) XXX_DiscardUnknown() { xxx_messageInfo_BlockID.DiscardUnknown(m) } var xxx_messageInfo_BlockID proto.InternalMessageInfo func (m *BlockID) GetHash() []byte { if m != nil { return m.Hash } return nil } func (m *BlockID) GetPartsHeader() PartSetHeader { if m != nil { return m.PartsHeader } return PartSetHeader{} } // Header defines the structure of a Tendermint block header. type Header struct { // basic block info Version version.Consensus `protobuf:"bytes,1,opt,name=version,proto3" json:"version"` ChainID string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` Time time.Time `protobuf:"bytes,4,opt,name=time,proto3,stdtime" json:"time"` // prev block info LastBlockId BlockID `protobuf:"bytes,5,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"` // hashes of block data LastCommitHash []byte `protobuf:"bytes,6,opt,name=last_commit_hash,json=lastCommitHash,proto3" json:"last_commit_hash,omitempty"` DataHash []byte `protobuf:"bytes,7,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"` // hashes from the app output from the prev block ValidatorsHash []byte `protobuf:"bytes,8,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"` NextValidatorsHash []byte `protobuf:"bytes,9,opt,name=next_validators_hash,json=nextValidatorsHash,proto3" json:"next_validators_hash,omitempty"` ConsensusHash []byte `protobuf:"bytes,10,opt,name=consensus_hash,json=consensusHash,proto3" json:"consensus_hash,omitempty"` AppHash []byte `protobuf:"bytes,11,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` LastResultsHash []byte `protobuf:"bytes,12,opt,name=last_results_hash,json=lastResultsHash,proto3" json:"last_results_hash,omitempty"` // consensus info EvidenceHash []byte `protobuf:"bytes,13,opt,name=evidence_hash,json=evidenceHash,proto3" json:"evidence_hash,omitempty"` ProposerAddress []byte `protobuf:"bytes,14,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` } func (m *Header) Reset() { *m = Header{} } func (m *Header) String() string { return proto.CompactTextString(m) } func (*Header) ProtoMessage() {} func (*Header) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{3} } func (m *Header) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Header.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *Header) XXX_Merge(src proto.Message) { xxx_messageInfo_Header.Merge(m, src) } func (m *Header) XXX_Size() int { return m.Size() } func (m *Header) XXX_DiscardUnknown() { xxx_messageInfo_Header.DiscardUnknown(m) } var xxx_messageInfo_Header proto.InternalMessageInfo func (m *Header) GetVersion() version.Consensus { if m != nil { return m.Version } return version.Consensus{} } func (m *Header) GetChainID() string { if m != nil { return m.ChainID } return "" } func (m *Header) GetHeight() int64 { if m != nil { return m.Height } return 0 } func (m *Header) GetTime() time.Time { if m != nil { return m.Time } return time.Time{} } func (m *Header) GetLastBlockId() BlockID { if m != nil { return m.LastBlockId } return BlockID{} } func (m *Header) GetLastCommitHash() []byte { if m != nil { return m.LastCommitHash } return nil } func (m *Header) GetDataHash() []byte { if m != nil { return m.DataHash } return nil } func (m *Header) GetValidatorsHash() []byte { if m != nil { return m.ValidatorsHash } return nil } func (m *Header) GetNextValidatorsHash() []byte { if m != nil { return m.NextValidatorsHash } return nil } func (m *Header) GetConsensusHash() []byte { if m != nil { return m.ConsensusHash } return nil } func (m *Header) GetAppHash() []byte { if m != nil { return m.AppHash } return nil } func (m *Header) GetLastResultsHash() []byte { if m != nil { return m.LastResultsHash } return nil } func (m *Header) GetEvidenceHash() []byte { if m != nil { return m.EvidenceHash } return nil } func (m *Header) GetProposerAddress() []byte { if m != nil { return m.ProposerAddress } return nil } // Data contains the set of transactions included in the block type Data struct { // Txs that will be applied by state @ block.Height+1. // NOTE: not all txs here are valid. We're just agreeing on the order first. // This means that block.AppHash does not include these txs. Txs [][]byte `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` // Volatile Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` } func (m *Data) Reset() { *m = Data{} } func (m *Data) String() string { return proto.CompactTextString(m) } func (*Data) ProtoMessage() {} func (*Data) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{4} } func (m *Data) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Data.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *Data) XXX_Merge(src proto.Message) { xxx_messageInfo_Data.Merge(m, src) } func (m *Data) XXX_Size() int { return m.Size() } func (m *Data) XXX_DiscardUnknown() { xxx_messageInfo_Data.DiscardUnknown(m) } var xxx_messageInfo_Data proto.InternalMessageInfo func (m *Data) GetTxs() [][]byte { if m != nil { return m.Txs } return nil } func (m *Data) GetHash() []byte { if m != nil { return m.Hash } return nil } // Vote represents a prevote, precommit, or commit vote from validators for // consensus. type Vote struct { Type SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.proto.types.SignedMsgType" json:"type,omitempty"` Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` Round int32 `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"` BlockID BlockID `protobuf:"bytes,4,opt,name=block_id,json=blockId,proto3" json:"block_id"` Timestamp time.Time `protobuf:"bytes,5,opt,name=timestamp,proto3,stdtime" json:"timestamp"` ValidatorAddress []byte `protobuf:"bytes,6,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` ValidatorIndex int32 `protobuf:"varint,7,opt,name=validator_index,json=validatorIndex,proto3" json:"validator_index,omitempty"` Signature []byte `protobuf:"bytes,8,opt,name=signature,proto3" json:"signature,omitempty"` } func (m *Vote) Reset() { *m = Vote{} } func (m *Vote) String() string { return proto.CompactTextString(m) } func (*Vote) ProtoMessage() {} func (*Vote) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{5} } func (m *Vote) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Vote.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *Vote) XXX_Merge(src proto.Message) { xxx_messageInfo_Vote.Merge(m, src) } func (m *Vote) XXX_Size() int { return m.Size() } func (m *Vote) XXX_DiscardUnknown() { xxx_messageInfo_Vote.DiscardUnknown(m) } var xxx_messageInfo_Vote proto.InternalMessageInfo func (m *Vote) GetType() SignedMsgType { if m != nil { return m.Type } return SIGNED_MSG_TYPE_UNKNOWN } func (m *Vote) GetHeight() int64 { if m != nil { return m.Height } return 0 } func (m *Vote) GetRound() int32 { if m != nil { return m.Round } return 0 } func (m *Vote) GetBlockID() BlockID { if m != nil { return m.BlockID } return BlockID{} } func (m *Vote) GetTimestamp() time.Time { if m != nil { return m.Timestamp } return time.Time{} } func (m *Vote) GetValidatorAddress() []byte { if m != nil { return m.ValidatorAddress } return nil } func (m *Vote) GetValidatorIndex() int32 { if m != nil { return m.ValidatorIndex } return 0 } func (m *Vote) GetSignature() []byte { if m != nil { return m.Signature } return nil } // Commit contains the evidence that a block was committed by a set of validators. type Commit struct { Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` BlockID BlockID `protobuf:"bytes,3,opt,name=block_id,json=blockId,proto3" json:"block_id"` Signatures []CommitSig `protobuf:"bytes,4,rep,name=signatures,proto3" json:"signatures"` Hash []byte `protobuf:"bytes,5,opt,name=hash,proto3" json:"hash,omitempty"` BitArray *bits.BitArray `protobuf:"bytes,6,opt,name=bit_array,json=bitArray,proto3" json:"bit_array,omitempty"` } func (m *Commit) Reset() { *m = Commit{} } func (m *Commit) String() string { return proto.CompactTextString(m) } func (*Commit) ProtoMessage() {} func (*Commit) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{6} } func (m *Commit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Commit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Commit.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *Commit) XXX_Merge(src proto.Message) { xxx_messageInfo_Commit.Merge(m, src) } func (m *Commit) XXX_Size() int { return m.Size() } func (m *Commit) XXX_DiscardUnknown() { xxx_messageInfo_Commit.DiscardUnknown(m) } var xxx_messageInfo_Commit proto.InternalMessageInfo func (m *Commit) GetHeight() int64 { if m != nil { return m.Height } return 0 } func (m *Commit) GetRound() int32 { if m != nil { return m.Round } return 0 } func (m *Commit) GetBlockID() BlockID { if m != nil { return m.BlockID } return BlockID{} } func (m *Commit) GetSignatures() []CommitSig { if m != nil { return m.Signatures } return nil } func (m *Commit) GetHash() []byte { if m != nil { return m.Hash } return nil } func (m *Commit) GetBitArray() *bits.BitArray { if m != nil { return m.BitArray } return nil } // CommitSig is a part of the Vote included in a Commit. type CommitSig struct { BlockIdFlag BlockIDFlag `protobuf:"varint,1,opt,name=block_id_flag,json=blockIdFlag,proto3,enum=tendermint.proto.types.BlockIDFlag" json:"block_id_flag,omitempty"` ValidatorAddress []byte `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,proto3,stdtime" json:"timestamp"` Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` } func (m *CommitSig) Reset() { *m = CommitSig{} } func (m *CommitSig) String() string { return proto.CompactTextString(m) } func (*CommitSig) ProtoMessage() {} func (*CommitSig) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{7} } func (m *CommitSig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CommitSig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_CommitSig.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *CommitSig) XXX_Merge(src proto.Message) { xxx_messageInfo_CommitSig.Merge(m, src) } func (m *CommitSig) XXX_Size() int { return m.Size() } func (m *CommitSig) XXX_DiscardUnknown() { xxx_messageInfo_CommitSig.DiscardUnknown(m) } var xxx_messageInfo_CommitSig proto.InternalMessageInfo func (m *CommitSig) GetBlockIdFlag() BlockIDFlag { if m != nil { return m.BlockIdFlag } return BLOCKD_ID_FLAG_UNKNOWN } func (m *CommitSig) GetValidatorAddress() []byte { if m != nil { return m.ValidatorAddress } return nil } func (m *CommitSig) GetTimestamp() time.Time { if m != nil { return m.Timestamp } return time.Time{} } func (m *CommitSig) GetSignature() []byte { if m != nil { return m.Signature } return nil } type Proposal struct { Type SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.proto.types.SignedMsgType" json:"type,omitempty"` Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` Round int32 `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"` PolRound int32 `protobuf:"varint,4,opt,name=pol_round,json=polRound,proto3" json:"pol_round,omitempty"` BlockID BlockID `protobuf:"bytes,5,opt,name=block_id,json=blockId,proto3" json:"block_id"` Timestamp time.Time `protobuf:"bytes,6,opt,name=timestamp,proto3,stdtime" json:"timestamp"` Signature []byte `protobuf:"bytes,7,opt,name=signature,proto3" json:"signature,omitempty"` } func (m *Proposal) Reset() { *m = Proposal{} } func (m *Proposal) String() string { return proto.CompactTextString(m) } func (*Proposal) ProtoMessage() {} func (*Proposal) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{8} } func (m *Proposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Proposal.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *Proposal) XXX_Merge(src proto.Message) { xxx_messageInfo_Proposal.Merge(m, src) } func (m *Proposal) XXX_Size() int { return m.Size() } func (m *Proposal) XXX_DiscardUnknown() { xxx_messageInfo_Proposal.DiscardUnknown(m) } var xxx_messageInfo_Proposal proto.InternalMessageInfo func (m *Proposal) GetType() SignedMsgType { if m != nil { return m.Type } return SIGNED_MSG_TYPE_UNKNOWN } func (m *Proposal) GetHeight() int64 { if m != nil { return m.Height } return 0 } func (m *Proposal) GetRound() int32 { if m != nil { return m.Round } return 0 } func (m *Proposal) GetPolRound() int32 { if m != nil { return m.PolRound } return 0 } func (m *Proposal) GetBlockID() BlockID { if m != nil { return m.BlockID } return BlockID{} } func (m *Proposal) GetTimestamp() time.Time { if m != nil { return m.Timestamp } return time.Time{} } func (m *Proposal) GetSignature() []byte { if m != nil { return m.Signature } return nil } type SignedHeader struct { Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` Commit *Commit `protobuf:"bytes,2,opt,name=commit,proto3" json:"commit,omitempty"` } func (m *SignedHeader) Reset() { *m = SignedHeader{} } func (m *SignedHeader) String() string { return proto.CompactTextString(m) } func (*SignedHeader) ProtoMessage() {} func (*SignedHeader) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{9} } func (m *SignedHeader) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *SignedHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_SignedHeader.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *SignedHeader) XXX_Merge(src proto.Message) { xxx_messageInfo_SignedHeader.Merge(m, src) } func (m *SignedHeader) XXX_Size() int { return m.Size() } func (m *SignedHeader) XXX_DiscardUnknown() { xxx_messageInfo_SignedHeader.DiscardUnknown(m) } var xxx_messageInfo_SignedHeader proto.InternalMessageInfo func (m *SignedHeader) GetHeader() *Header { if m != nil { return m.Header } return nil } func (m *SignedHeader) GetCommit() *Commit { if m != nil { return m.Commit } return nil } type BlockMeta struct { BlockID BlockID `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id"` BlockSize int64 `protobuf:"varint,2,opt,name=block_size,json=blockSize,proto3" json:"block_size,omitempty"` Header Header `protobuf:"bytes,3,opt,name=header,proto3" json:"header"` NumTxs int64 `protobuf:"varint,4,opt,name=num_txs,json=numTxs,proto3" json:"num_txs,omitempty"` } func (m *BlockMeta) Reset() { *m = BlockMeta{} } func (m *BlockMeta) String() string { return proto.CompactTextString(m) } func (*BlockMeta) ProtoMessage() {} func (*BlockMeta) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{10} } func (m *BlockMeta) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *BlockMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_BlockMeta.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *BlockMeta) XXX_Merge(src proto.Message) { xxx_messageInfo_BlockMeta.Merge(m, src) } func (m *BlockMeta) XXX_Size() int { return m.Size() } func (m *BlockMeta) XXX_DiscardUnknown() { xxx_messageInfo_BlockMeta.DiscardUnknown(m) } var xxx_messageInfo_BlockMeta proto.InternalMessageInfo func (m *BlockMeta) GetBlockID() BlockID { if m != nil { return m.BlockID } return BlockID{} } func (m *BlockMeta) GetBlockSize() int64 { if m != nil { return m.BlockSize } return 0 } func (m *BlockMeta) GetHeader() Header { if m != nil { return m.Header } return Header{} } func (m *BlockMeta) GetNumTxs() int64 { if m != nil { return m.NumTxs } return 0 } func init() { proto.RegisterEnum("tendermint.proto.types.BlockIDFlag", BlockIDFlag_name, BlockIDFlag_value) proto.RegisterEnum("tendermint.proto.types.SignedMsgType", SignedMsgType_name, SignedMsgType_value) proto.RegisterType((*PartSetHeader)(nil), "tendermint.proto.types.PartSetHeader") proto.RegisterType((*Part)(nil), "tendermint.proto.types.Part") proto.RegisterType((*BlockID)(nil), "tendermint.proto.types.BlockID") proto.RegisterType((*Header)(nil), "tendermint.proto.types.Header") proto.RegisterType((*Data)(nil), "tendermint.proto.types.Data") proto.RegisterType((*Vote)(nil), "tendermint.proto.types.Vote") proto.RegisterType((*Commit)(nil), "tendermint.proto.types.Commit") proto.RegisterType((*CommitSig)(nil), "tendermint.proto.types.CommitSig") proto.RegisterType((*Proposal)(nil), "tendermint.proto.types.Proposal") proto.RegisterType((*SignedHeader)(nil), "tendermint.proto.types.SignedHeader") proto.RegisterType((*BlockMeta)(nil), "tendermint.proto.types.BlockMeta") } func init() { proto.RegisterFile("proto/types/types.proto", fileDescriptor_ff06f8095857fb18) } var fileDescriptor_ff06f8095857fb18 = []byte{ // 1283 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4d, 0x6f, 0x1a, 0x47, 0x18, 0x66, 0x61, 0x31, 0xf0, 0x02, 0x36, 0x5e, 0xb9, 0x09, 0xc5, 0x2d, 0x26, 0xb8, 0x49, 0x9d, 0x0f, 0x2d, 0x95, 0x2b, 0x55, 0x8d, 0xd4, 0x0b, 0xd8, 0x8e, 0x83, 0x62, 0x63, 0xb4, 0xd0, 0x54, 0xed, 0x65, 0x35, 0xb0, 0x93, 0x65, 0x95, 0x65, 0x77, 0xb5, 0x3b, 0x58, 0x26, 0x95, 0x7a, 0xae, 0x7c, 0xca, 0x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xbb, 0x04, 0x33, 0xfe, 0x4d, 0x58, 0x6e, 0x6b, 0x7b, 0x7c, 0xb1, 0x1c, 0x14, 0x2f, 0xad, 0x9e, 0x9e, 0x55, 0xf2, 0x6d, 0x1f, 0x73, 0x23, 0x30, 0xd8, 0x26, 0xe4, 0xdb, 0xda, 0x51, 0xfb, 0xa8, 0x53, 0x3f, 0xe0, 0xa8, 0x44, 0xa9, 0x70, 0x7a, 0x56, 0xc9, 0x85, 0x47, 0x9c, 0x82, 0x26, 0xeb, 0x6c, 0x3c, 0x78, 0x79, 0x5e, 0x96, 0x5e, 0x9d, 0x97, 0xa5, 0x3f, 0xce, 0xcb, 0xd2, 0xf3, 0x8b, 0x72, 0xec, 0xd5, 0x45, 0x39, 0xf6, 0xdb, 0x45, 0x39, 0xf6, 0xcd, 0x3d, 0xd3, 0x22, 0x83, 0x51, 0x4f, 0xed, 0xbb, 0xc3, 0xda, 0x64, 0x57, 0xa7, 0x3f, 0xa7, 0x7e, 0x5a, 0xf4, 0x96, 0xd8, 0xe0, 0xd3, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xb2, 0xd1, 0x12, 0x04, 0x70, 0x0c, 0x00, 0x00, } func (m *PartSetHeader) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *PartSetHeader) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PartSetHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Hash) > 0 { i -= len(m.Hash) copy(dAtA[i:], m.Hash) i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) i-- dAtA[i] = 0x12 } if m.Total != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.Total)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *Part) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Part) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Part) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a if len(m.Bytes) > 0 { i -= len(m.Bytes) copy(dAtA[i:], m.Bytes) i = encodeVarintTypes(dAtA, i, uint64(len(m.Bytes))) i-- dAtA[i] = 0x12 } if m.Index != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.Index)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *BlockID) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *BlockID) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *BlockID) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { size, err := m.PartsHeader.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 if len(m.Hash) > 0 { i -= len(m.Hash) copy(dAtA[i:], m.Hash) i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *Header) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Header) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.ProposerAddress) > 0 { i -= len(m.ProposerAddress) copy(dAtA[i:], m.ProposerAddress) i = encodeVarintTypes(dAtA, i, uint64(len(m.ProposerAddress))) i-- dAtA[i] = 0x72 } if len(m.EvidenceHash) > 0 { i -= len(m.EvidenceHash) copy(dAtA[i:], m.EvidenceHash) i = encodeVarintTypes(dAtA, i, uint64(len(m.EvidenceHash))) i-- dAtA[i] = 0x6a } if len(m.LastResultsHash) > 0 { i -= len(m.LastResultsHash) copy(dAtA[i:], m.LastResultsHash) i = encodeVarintTypes(dAtA, i, uint64(len(m.LastResultsHash))) i-- dAtA[i] = 0x62 } if len(m.AppHash) > 0 { i -= len(m.AppHash) copy(dAtA[i:], m.AppHash) i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash))) i-- dAtA[i] = 0x5a } if len(m.ConsensusHash) > 0 { i -= len(m.ConsensusHash) copy(dAtA[i:], m.ConsensusHash) i = encodeVarintTypes(dAtA, i, uint64(len(m.ConsensusHash))) i-- dAtA[i] = 0x52 } if len(m.NextValidatorsHash) > 0 { i -= len(m.NextValidatorsHash) copy(dAtA[i:], m.NextValidatorsHash) i = encodeVarintTypes(dAtA, i, uint64(len(m.NextValidatorsHash))) i-- dAtA[i] = 0x4a } if len(m.ValidatorsHash) > 0 { i -= len(m.ValidatorsHash) copy(dAtA[i:], m.ValidatorsHash) i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorsHash))) i-- dAtA[i] = 0x42 } if len(m.DataHash) > 0 { i -= len(m.DataHash) copy(dAtA[i:], m.DataHash) i = encodeVarintTypes(dAtA, i, uint64(len(m.DataHash))) i-- dAtA[i] = 0x3a } if len(m.LastCommitHash) > 0 { i -= len(m.LastCommitHash) copy(dAtA[i:], m.LastCommitHash) i = encodeVarintTypes(dAtA, i, uint64(len(m.LastCommitHash))) i-- dAtA[i] = 0x32 } { size, err := m.LastBlockId.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x2a n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) if err4 != nil { return 0, err4 } i -= n4 i = encodeVarintTypes(dAtA, i, uint64(n4)) i-- dAtA[i] = 0x22 if m.Height != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.Height)) i-- dAtA[i] = 0x18 } if len(m.ChainID) > 0 { i -= len(m.ChainID) copy(dAtA[i:], m.ChainID) i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainID))) i-- dAtA[i] = 0x12 } { size, err := m.Version.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *Data) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Data) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Data) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Hash) > 0 { i -= len(m.Hash) copy(dAtA[i:], m.Hash) i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) i-- dAtA[i] = 0x12 } if len(m.Txs) > 0 { for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Txs[iNdEx]) copy(dAtA[i:], m.Txs[iNdEx]) i = encodeVarintTypes(dAtA, i, uint64(len(m.Txs[iNdEx]))) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *Vote) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Vote) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Signature) > 0 { i -= len(m.Signature) copy(dAtA[i:], m.Signature) i = encodeVarintTypes(dAtA, i, uint64(len(m.Signature))) i-- dAtA[i] = 0x42 } if m.ValidatorIndex != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.ValidatorIndex)) i-- dAtA[i] = 0x38 } if len(m.ValidatorAddress) > 0 { i -= len(m.ValidatorAddress) copy(dAtA[i:], m.ValidatorAddress) i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorAddress))) i-- dAtA[i] = 0x32 } n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) if err6 != nil { return 0, err6 } i -= n6 i = encodeVarintTypes(dAtA, i, uint64(n6)) i-- dAtA[i] = 0x2a { size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 if m.Round != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.Round)) i-- dAtA[i] = 0x18 } if m.Height != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.Height)) i-- dAtA[i] = 0x10 } if m.Type != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.Type)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *Commit) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Commit) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Commit) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.BitArray != nil { { size, err := m.BitArray.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x32 } if len(m.Hash) > 0 { i -= len(m.Hash) copy(dAtA[i:], m.Hash) i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) i-- dAtA[i] = 0x2a } if len(m.Signatures) > 0 { for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Signatures[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 } } { size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a if m.Round != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.Round)) i-- dAtA[i] = 0x10 } if m.Height != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.Height)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *CommitSig) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CommitSig) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *CommitSig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Signature) > 0 { i -= len(m.Signature) copy(dAtA[i:], m.Signature) i = encodeVarintTypes(dAtA, i, uint64(len(m.Signature))) i-- dAtA[i] = 0x22 } n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) if err10 != nil { return 0, err10 } i -= n10 i = encodeVarintTypes(dAtA, i, uint64(n10)) i-- dAtA[i] = 0x1a if len(m.ValidatorAddress) > 0 { i -= len(m.ValidatorAddress) copy(dAtA[i:], m.ValidatorAddress) i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorAddress))) i-- dAtA[i] = 0x12 } if m.BlockIdFlag != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.BlockIdFlag)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *Proposal) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Proposal) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Signature) > 0 { i -= len(m.Signature) copy(dAtA[i:], m.Signature) i = encodeVarintTypes(dAtA, i, uint64(len(m.Signature))) i-- dAtA[i] = 0x3a } n11, err11 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) if err11 != nil { return 0, err11 } i -= n11 i = encodeVarintTypes(dAtA, i, uint64(n11)) i-- dAtA[i] = 0x32 { size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x2a if m.PolRound != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.PolRound)) i-- dAtA[i] = 0x20 } if m.Round != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.Round)) i-- dAtA[i] = 0x18 } if m.Height != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.Height)) i-- dAtA[i] = 0x10 } if m.Type != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.Type)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *SignedHeader) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *SignedHeader) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *SignedHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Commit != nil { { size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if m.Header != nil { { size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *BlockMeta) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *BlockMeta) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *BlockMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.NumTxs != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.NumTxs)) i-- dAtA[i] = 0x20 } { size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a if m.BlockSize != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.BlockSize)) i-- dAtA[i] = 0x10 } { size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { offset -= sovTypes(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *PartSetHeader) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Total != 0 { n += 1 + sovTypes(uint64(m.Total)) } l = len(m.Hash) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } return n } func (m *Part) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Index != 0 { n += 1 + sovTypes(uint64(m.Index)) } l = len(m.Bytes) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } l = m.Proof.Size() n += 1 + l + sovTypes(uint64(l)) return n } func (m *BlockID) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Hash) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } l = m.PartsHeader.Size() n += 1 + l + sovTypes(uint64(l)) return n } func (m *Header) Size() (n int) { if m == nil { return 0 } var l int _ = l l = m.Version.Size() n += 1 + l + sovTypes(uint64(l)) l = len(m.ChainID) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } if m.Height != 0 { n += 1 + sovTypes(uint64(m.Height)) } l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) n += 1 + l + sovTypes(uint64(l)) l = m.LastBlockId.Size() n += 1 + l + sovTypes(uint64(l)) l = len(m.LastCommitHash) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } l = len(m.DataHash) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } l = len(m.ValidatorsHash) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } l = len(m.NextValidatorsHash) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } l = len(m.ConsensusHash) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } l = len(m.AppHash) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } l = len(m.LastResultsHash) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } l = len(m.EvidenceHash) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } l = len(m.ProposerAddress) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } return n } func (m *Data) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Txs) > 0 { for _, b := range m.Txs { l = len(b) n += 1 + l + sovTypes(uint64(l)) } } l = len(m.Hash) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } return n } func (m *Vote) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Type != 0 { n += 1 + sovTypes(uint64(m.Type)) } if m.Height != 0 { n += 1 + sovTypes(uint64(m.Height)) } if m.Round != 0 { n += 1 + sovTypes(uint64(m.Round)) } l = m.BlockID.Size() n += 1 + l + sovTypes(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) n += 1 + l + sovTypes(uint64(l)) l = len(m.ValidatorAddress) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } if m.ValidatorIndex != 0 { n += 1 + sovTypes(uint64(m.ValidatorIndex)) } l = len(m.Signature) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } return n } func (m *Commit) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Height != 0 { n += 1 + sovTypes(uint64(m.Height)) } if m.Round != 0 { n += 1 + sovTypes(uint64(m.Round)) } l = m.BlockID.Size() n += 1 + l + sovTypes(uint64(l)) if len(m.Signatures) > 0 { for _, e := range m.Signatures { l = e.Size() n += 1 + l + sovTypes(uint64(l)) } } l = len(m.Hash) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } if m.BitArray != nil { l = m.BitArray.Size() n += 1 + l + sovTypes(uint64(l)) } return n } func (m *CommitSig) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.BlockIdFlag != 0 { n += 1 + sovTypes(uint64(m.BlockIdFlag)) } l = len(m.ValidatorAddress) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) n += 1 + l + sovTypes(uint64(l)) l = len(m.Signature) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } return n } func (m *Proposal) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Type != 0 { n += 1 + sovTypes(uint64(m.Type)) } if m.Height != 0 { n += 1 + sovTypes(uint64(m.Height)) } if m.Round != 0 { n += 1 + sovTypes(uint64(m.Round)) } if m.PolRound != 0 { n += 1 + sovTypes(uint64(m.PolRound)) } l = m.BlockID.Size() n += 1 + l + sovTypes(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) n += 1 + l + sovTypes(uint64(l)) l = len(m.Signature) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } return n } func (m *SignedHeader) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Header != nil { l = m.Header.Size() n += 1 + l + sovTypes(uint64(l)) } if m.Commit != nil { l = m.Commit.Size() n += 1 + l + sovTypes(uint64(l)) } return n } func (m *BlockMeta) Size() (n int) { if m == nil { return 0 } var l int _ = l l = m.BlockID.Size() n += 1 + l + sovTypes(uint64(l)) if m.BlockSize != 0 { n += 1 + sovTypes(uint64(m.BlockSize)) } l = m.Header.Size() n += 1 + l + sovTypes(uint64(l)) if m.NumTxs != 0 { n += 1 + sovTypes(uint64(m.NumTxs)) } return n } func sovTypes(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozTypes(x uint64) (n int) { return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *PartSetHeader) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: PartSetHeader: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: PartSetHeader: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) } m.Total = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Total |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) if m.Hash == nil { m.Hash = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Part) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Part: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Part: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) } m.Index = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Index |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.Bytes = append(m.Bytes[:0], dAtA[iNdEx:postIndex]...) if m.Bytes == nil { m.Bytes = []byte{} } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *BlockID) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: BlockID: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: BlockID: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) if m.Hash == nil { m.Hash = []byte{} } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PartsHeader", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.PartsHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Header) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Header: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.ChainID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) } m.Height = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Height |= int64(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LastBlockId", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.LastBlockId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LastCommitHash", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.LastCommitHash = append(m.LastCommitHash[:0], dAtA[iNdEx:postIndex]...) if m.LastCommitHash == nil { m.LastCommitHash = []byte{} } iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DataHash", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.DataHash = append(m.DataHash[:0], dAtA[iNdEx:postIndex]...) if m.DataHash == nil { m.DataHash = []byte{} } iNdEx = postIndex case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorsHash", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.ValidatorsHash = append(m.ValidatorsHash[:0], dAtA[iNdEx:postIndex]...) if m.ValidatorsHash == nil { m.ValidatorsHash = []byte{} } iNdEx = postIndex case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field NextValidatorsHash", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.NextValidatorsHash = append(m.NextValidatorsHash[:0], dAtA[iNdEx:postIndex]...) if m.NextValidatorsHash == nil { m.NextValidatorsHash = []byte{} } iNdEx = postIndex case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ConsensusHash", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.ConsensusHash = append(m.ConsensusHash[:0], dAtA[iNdEx:postIndex]...) if m.ConsensusHash == nil { m.ConsensusHash = []byte{} } iNdEx = postIndex case 11: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...) if m.AppHash == nil { m.AppHash = []byte{} } iNdEx = postIndex case 12: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LastResultsHash", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.LastResultsHash = append(m.LastResultsHash[:0], dAtA[iNdEx:postIndex]...) if m.LastResultsHash == nil { m.LastResultsHash = []byte{} } iNdEx = postIndex case 13: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EvidenceHash", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.EvidenceHash = append(m.EvidenceHash[:0], dAtA[iNdEx:postIndex]...) if m.EvidenceHash == nil { m.EvidenceHash = []byte{} } iNdEx = postIndex case 14: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) if m.ProposerAddress == nil { m.ProposerAddress = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Data) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Data: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Data: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.Txs = append(m.Txs, make([]byte, postIndex-iNdEx)) copy(m.Txs[len(m.Txs)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) if m.Hash == nil { m.Hash = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Vote) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Vote: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Vote: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Type |= SignedMsgType(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) } m.Height = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Height |= int64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) } m.Round = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Round |= int32(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) if m.ValidatorAddress == nil { m.ValidatorAddress = []byte{} } iNdEx = postIndex case 7: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorIndex", wireType) } m.ValidatorIndex = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.ValidatorIndex |= int32(b&0x7F) << shift if b < 0x80 { break } } case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) if m.Signature == nil { m.Signature = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Commit) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Commit: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Commit: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) } m.Height = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Height |= int64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) } m.Round = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Round |= int32(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.Signatures = append(m.Signatures, CommitSig{}) if err := m.Signatures[len(m.Signatures)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) if m.Hash == nil { m.Hash = []byte{} } iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field BitArray", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } if m.BitArray == nil { m.BitArray = &bits.BitArray{} } if err := m.BitArray.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CommitSig) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: CommitSig: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CommitSig: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field BlockIdFlag", wireType) } m.BlockIdFlag = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.BlockIdFlag |= BlockIDFlag(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) if m.ValidatorAddress == nil { m.ValidatorAddress = []byte{} } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) if m.Signature == nil { m.Signature = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Proposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Proposal: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Proposal: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Type |= SignedMsgType(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) } m.Height = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Height |= int64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) } m.Round = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Round |= int32(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field PolRound", wireType) } m.PolRound = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.PolRound |= int32(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) if m.Signature == nil { m.Signature = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *SignedHeader) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: SignedHeader: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: SignedHeader: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } if m.Header == nil { m.Header = &Header{} } if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } if m.Commit == nil { m.Commit = &Commit{} } if err := m.Commit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *BlockMeta) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: BlockMeta: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: BlockMeta: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field BlockSize", wireType) } m.BlockSize = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.BlockSize |= int64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field NumTxs", wireType) } m.NumTxs = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.NumTxs |= int64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipTypes(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowTypes } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowTypes } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } case 1: iNdEx += 8 case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowTypes } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if length < 0 { return 0, ErrInvalidLengthTypes } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupTypes } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthTypes } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") )