// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: proto/types/evidence.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/gogo/protobuf/types" keys "github.com/tendermint/tendermint/proto/crypto/keys" 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 // DuplicateVoteEvidence contains evidence a validator signed two conflicting // votes. type DuplicateVoteEvidence struct { VoteA *Vote `protobuf:"bytes,1,opt,name=vote_a,json=voteA,proto3" json:"vote_a,omitempty"` VoteB *Vote `protobuf:"bytes,2,opt,name=vote_b,json=voteB,proto3" json:"vote_b,omitempty"` } func (m *DuplicateVoteEvidence) Reset() { *m = DuplicateVoteEvidence{} } func (m *DuplicateVoteEvidence) String() string { return proto.CompactTextString(m) } func (*DuplicateVoteEvidence) ProtoMessage() {} func (*DuplicateVoteEvidence) Descriptor() ([]byte, []int) { return fileDescriptor_86495eef24aeacc0, []int{0} } func (m *DuplicateVoteEvidence) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *DuplicateVoteEvidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_DuplicateVoteEvidence.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 *DuplicateVoteEvidence) XXX_Merge(src proto.Message) { xxx_messageInfo_DuplicateVoteEvidence.Merge(m, src) } func (m *DuplicateVoteEvidence) XXX_Size() int { return m.Size() } func (m *DuplicateVoteEvidence) XXX_DiscardUnknown() { xxx_messageInfo_DuplicateVoteEvidence.DiscardUnknown(m) } var xxx_messageInfo_DuplicateVoteEvidence proto.InternalMessageInfo func (m *DuplicateVoteEvidence) GetVoteA() *Vote { if m != nil { return m.VoteA } return nil } func (m *DuplicateVoteEvidence) GetVoteB() *Vote { if m != nil { return m.VoteB } return nil } type PotentialAmnesiaEvidence struct { VoteA *Vote `protobuf:"bytes,1,opt,name=vote_a,json=voteA,proto3" json:"vote_a,omitempty"` VoteB *Vote `protobuf:"bytes,2,opt,name=vote_b,json=voteB,proto3" json:"vote_b,omitempty"` HeightStamp int64 `protobuf:"varint,3,opt,name=height_stamp,json=heightStamp,proto3" json:"height_stamp,omitempty"` } func (m *PotentialAmnesiaEvidence) Reset() { *m = PotentialAmnesiaEvidence{} } func (m *PotentialAmnesiaEvidence) String() string { return proto.CompactTextString(m) } func (*PotentialAmnesiaEvidence) ProtoMessage() {} func (*PotentialAmnesiaEvidence) Descriptor() ([]byte, []int) { return fileDescriptor_86495eef24aeacc0, []int{1} } func (m *PotentialAmnesiaEvidence) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *PotentialAmnesiaEvidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_PotentialAmnesiaEvidence.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 *PotentialAmnesiaEvidence) XXX_Merge(src proto.Message) { xxx_messageInfo_PotentialAmnesiaEvidence.Merge(m, src) } func (m *PotentialAmnesiaEvidence) XXX_Size() int { return m.Size() } func (m *PotentialAmnesiaEvidence) XXX_DiscardUnknown() { xxx_messageInfo_PotentialAmnesiaEvidence.DiscardUnknown(m) } var xxx_messageInfo_PotentialAmnesiaEvidence proto.InternalMessageInfo func (m *PotentialAmnesiaEvidence) GetVoteA() *Vote { if m != nil { return m.VoteA } return nil } func (m *PotentialAmnesiaEvidence) GetVoteB() *Vote { if m != nil { return m.VoteB } return nil } func (m *PotentialAmnesiaEvidence) GetHeightStamp() int64 { if m != nil { return m.HeightStamp } return 0 } type AmnesiaEvidence struct { PotentialAmnesiaEvidence *PotentialAmnesiaEvidence `protobuf:"bytes,1,opt,name=potential_amnesia_evidence,json=potentialAmnesiaEvidence,proto3" json:"potential_amnesia_evidence,omitempty"` Polc *ProofOfLockChange `protobuf:"bytes,2,opt,name=polc,proto3" json:"polc,omitempty"` } func (m *AmnesiaEvidence) Reset() { *m = AmnesiaEvidence{} } func (m *AmnesiaEvidence) String() string { return proto.CompactTextString(m) } func (*AmnesiaEvidence) ProtoMessage() {} func (*AmnesiaEvidence) Descriptor() ([]byte, []int) { return fileDescriptor_86495eef24aeacc0, []int{2} } func (m *AmnesiaEvidence) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *AmnesiaEvidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_AmnesiaEvidence.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 *AmnesiaEvidence) XXX_Merge(src proto.Message) { xxx_messageInfo_AmnesiaEvidence.Merge(m, src) } func (m *AmnesiaEvidence) XXX_Size() int { return m.Size() } func (m *AmnesiaEvidence) XXX_DiscardUnknown() { xxx_messageInfo_AmnesiaEvidence.DiscardUnknown(m) } var xxx_messageInfo_AmnesiaEvidence proto.InternalMessageInfo func (m *AmnesiaEvidence) GetPotentialAmnesiaEvidence() *PotentialAmnesiaEvidence { if m != nil { return m.PotentialAmnesiaEvidence } return nil } func (m *AmnesiaEvidence) GetPolc() *ProofOfLockChange { if m != nil { return m.Polc } return nil } // MockEvidence is used for testing pruposes type MockEvidence struct { EvidenceHeight int64 `protobuf:"varint,1,opt,name=evidence_height,json=evidenceHeight,proto3" json:"evidence_height,omitempty"` EvidenceTime time.Time `protobuf:"bytes,2,opt,name=evidence_time,json=evidenceTime,proto3,stdtime" json:"evidence_time"` EvidenceAddress []byte `protobuf:"bytes,3,opt,name=evidence_address,json=evidenceAddress,proto3" json:"evidence_address,omitempty"` } func (m *MockEvidence) Reset() { *m = MockEvidence{} } func (m *MockEvidence) String() string { return proto.CompactTextString(m) } func (*MockEvidence) ProtoMessage() {} func (*MockEvidence) Descriptor() ([]byte, []int) { return fileDescriptor_86495eef24aeacc0, []int{3} } func (m *MockEvidence) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MockEvidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MockEvidence.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 *MockEvidence) XXX_Merge(src proto.Message) { xxx_messageInfo_MockEvidence.Merge(m, src) } func (m *MockEvidence) XXX_Size() int { return m.Size() } func (m *MockEvidence) XXX_DiscardUnknown() { xxx_messageInfo_MockEvidence.DiscardUnknown(m) } var xxx_messageInfo_MockEvidence proto.InternalMessageInfo func (m *MockEvidence) GetEvidenceHeight() int64 { if m != nil { return m.EvidenceHeight } return 0 } func (m *MockEvidence) GetEvidenceTime() time.Time { if m != nil { return m.EvidenceTime } return time.Time{} } func (m *MockEvidence) GetEvidenceAddress() []byte { if m != nil { return m.EvidenceAddress } return nil } type MockRandomEvidence struct { EvidenceHeight int64 `protobuf:"varint,1,opt,name=evidence_height,json=evidenceHeight,proto3" json:"evidence_height,omitempty"` EvidenceTime time.Time `protobuf:"bytes,2,opt,name=evidence_time,json=evidenceTime,proto3,stdtime" json:"evidence_time"` EvidenceAddress []byte `protobuf:"bytes,3,opt,name=evidence_address,json=evidenceAddress,proto3" json:"evidence_address,omitempty"` RandBytes []byte `protobuf:"bytes,4,opt,name=rand_bytes,json=randBytes,proto3" json:"rand_bytes,omitempty"` } func (m *MockRandomEvidence) Reset() { *m = MockRandomEvidence{} } func (m *MockRandomEvidence) String() string { return proto.CompactTextString(m) } func (*MockRandomEvidence) ProtoMessage() {} func (*MockRandomEvidence) Descriptor() ([]byte, []int) { return fileDescriptor_86495eef24aeacc0, []int{4} } func (m *MockRandomEvidence) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MockRandomEvidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MockRandomEvidence.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 *MockRandomEvidence) XXX_Merge(src proto.Message) { xxx_messageInfo_MockRandomEvidence.Merge(m, src) } func (m *MockRandomEvidence) XXX_Size() int { return m.Size() } func (m *MockRandomEvidence) XXX_DiscardUnknown() { xxx_messageInfo_MockRandomEvidence.DiscardUnknown(m) } var xxx_messageInfo_MockRandomEvidence proto.InternalMessageInfo func (m *MockRandomEvidence) GetEvidenceHeight() int64 { if m != nil { return m.EvidenceHeight } return 0 } func (m *MockRandomEvidence) GetEvidenceTime() time.Time { if m != nil { return m.EvidenceTime } return time.Time{} } func (m *MockRandomEvidence) GetEvidenceAddress() []byte { if m != nil { return m.EvidenceAddress } return nil } func (m *MockRandomEvidence) GetRandBytes() []byte { if m != nil { return m.RandBytes } return nil } type ConflictingHeadersEvidence struct { H1 *SignedHeader `protobuf:"bytes,1,opt,name=h1,proto3" json:"h1,omitempty"` H2 *SignedHeader `protobuf:"bytes,2,opt,name=h2,proto3" json:"h2,omitempty"` } func (m *ConflictingHeadersEvidence) Reset() { *m = ConflictingHeadersEvidence{} } func (m *ConflictingHeadersEvidence) String() string { return proto.CompactTextString(m) } func (*ConflictingHeadersEvidence) ProtoMessage() {} func (*ConflictingHeadersEvidence) Descriptor() ([]byte, []int) { return fileDescriptor_86495eef24aeacc0, []int{5} } func (m *ConflictingHeadersEvidence) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ConflictingHeadersEvidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ConflictingHeadersEvidence.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 *ConflictingHeadersEvidence) XXX_Merge(src proto.Message) { xxx_messageInfo_ConflictingHeadersEvidence.Merge(m, src) } func (m *ConflictingHeadersEvidence) XXX_Size() int { return m.Size() } func (m *ConflictingHeadersEvidence) XXX_DiscardUnknown() { xxx_messageInfo_ConflictingHeadersEvidence.DiscardUnknown(m) } var xxx_messageInfo_ConflictingHeadersEvidence proto.InternalMessageInfo func (m *ConflictingHeadersEvidence) GetH1() *SignedHeader { if m != nil { return m.H1 } return nil } func (m *ConflictingHeadersEvidence) GetH2() *SignedHeader { if m != nil { return m.H2 } return nil } type LunaticValidatorEvidence struct { Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` Vote *Vote `protobuf:"bytes,2,opt,name=vote,proto3" json:"vote,omitempty"` InvalidHeaderField string `protobuf:"bytes,3,opt,name=invalid_header_field,json=invalidHeaderField,proto3" json:"invalid_header_field,omitempty"` } func (m *LunaticValidatorEvidence) Reset() { *m = LunaticValidatorEvidence{} } func (m *LunaticValidatorEvidence) String() string { return proto.CompactTextString(m) } func (*LunaticValidatorEvidence) ProtoMessage() {} func (*LunaticValidatorEvidence) Descriptor() ([]byte, []int) { return fileDescriptor_86495eef24aeacc0, []int{6} } func (m *LunaticValidatorEvidence) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *LunaticValidatorEvidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_LunaticValidatorEvidence.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 *LunaticValidatorEvidence) XXX_Merge(src proto.Message) { xxx_messageInfo_LunaticValidatorEvidence.Merge(m, src) } func (m *LunaticValidatorEvidence) XXX_Size() int { return m.Size() } func (m *LunaticValidatorEvidence) XXX_DiscardUnknown() { xxx_messageInfo_LunaticValidatorEvidence.DiscardUnknown(m) } var xxx_messageInfo_LunaticValidatorEvidence proto.InternalMessageInfo func (m *LunaticValidatorEvidence) GetHeader() *Header { if m != nil { return m.Header } return nil } func (m *LunaticValidatorEvidence) GetVote() *Vote { if m != nil { return m.Vote } return nil } func (m *LunaticValidatorEvidence) GetInvalidHeaderField() string { if m != nil { return m.InvalidHeaderField } return "" } type PhantomValidatorEvidence struct { Vote *Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote,omitempty"` LastHeightValidatorWasInSet int64 `protobuf:"varint,2,opt,name=last_height_validator_was_in_set,json=lastHeightValidatorWasInSet,proto3" json:"last_height_validator_was_in_set,omitempty"` } func (m *PhantomValidatorEvidence) Reset() { *m = PhantomValidatorEvidence{} } func (m *PhantomValidatorEvidence) String() string { return proto.CompactTextString(m) } func (*PhantomValidatorEvidence) ProtoMessage() {} func (*PhantomValidatorEvidence) Descriptor() ([]byte, []int) { return fileDescriptor_86495eef24aeacc0, []int{7} } func (m *PhantomValidatorEvidence) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *PhantomValidatorEvidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_PhantomValidatorEvidence.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 *PhantomValidatorEvidence) XXX_Merge(src proto.Message) { xxx_messageInfo_PhantomValidatorEvidence.Merge(m, src) } func (m *PhantomValidatorEvidence) XXX_Size() int { return m.Size() } func (m *PhantomValidatorEvidence) XXX_DiscardUnknown() { xxx_messageInfo_PhantomValidatorEvidence.DiscardUnknown(m) } var xxx_messageInfo_PhantomValidatorEvidence proto.InternalMessageInfo func (m *PhantomValidatorEvidence) GetVote() *Vote { if m != nil { return m.Vote } return nil } func (m *PhantomValidatorEvidence) GetLastHeightValidatorWasInSet() int64 { if m != nil { return m.LastHeightValidatorWasInSet } return 0 } type Evidence struct { // Types that are valid to be assigned to Sum: // *Evidence_DuplicateVoteEvidence // *Evidence_ConflictingHeadersEvidence // *Evidence_LunaticValidatorEvidence // *Evidence_PotentialAmnesiaEvidence // *Evidence_AmnesiaEvidence // *Evidence_PhantomValidatorEvidence // *Evidence_MockEvidence // *Evidence_MockRandomEvidence Sum isEvidence_Sum `protobuf_oneof:"sum"` } func (m *Evidence) Reset() { *m = Evidence{} } func (m *Evidence) String() string { return proto.CompactTextString(m) } func (*Evidence) ProtoMessage() {} func (*Evidence) Descriptor() ([]byte, []int) { return fileDescriptor_86495eef24aeacc0, []int{8} } func (m *Evidence) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Evidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Evidence.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 *Evidence) XXX_Merge(src proto.Message) { xxx_messageInfo_Evidence.Merge(m, src) } func (m *Evidence) XXX_Size() int { return m.Size() } func (m *Evidence) XXX_DiscardUnknown() { xxx_messageInfo_Evidence.DiscardUnknown(m) } var xxx_messageInfo_Evidence proto.InternalMessageInfo type isEvidence_Sum interface { isEvidence_Sum() MarshalTo([]byte) (int, error) Size() int } type Evidence_DuplicateVoteEvidence struct { DuplicateVoteEvidence *DuplicateVoteEvidence `protobuf:"bytes,1,opt,name=duplicate_vote_evidence,json=duplicateVoteEvidence,proto3,oneof" json:"duplicate_vote_evidence,omitempty"` } type Evidence_ConflictingHeadersEvidence struct { ConflictingHeadersEvidence *ConflictingHeadersEvidence `protobuf:"bytes,2,opt,name=conflicting_headers_evidence,json=conflictingHeadersEvidence,proto3,oneof" json:"conflicting_headers_evidence,omitempty"` } type Evidence_LunaticValidatorEvidence struct { LunaticValidatorEvidence *LunaticValidatorEvidence `protobuf:"bytes,3,opt,name=lunatic_validator_evidence,json=lunaticValidatorEvidence,proto3,oneof" json:"lunatic_validator_evidence,omitempty"` } type Evidence_PotentialAmnesiaEvidence struct { PotentialAmnesiaEvidence *PotentialAmnesiaEvidence `protobuf:"bytes,4,opt,name=potential_amnesia_evidence,json=potentialAmnesiaEvidence,proto3,oneof" json:"potential_amnesia_evidence,omitempty"` } type Evidence_AmnesiaEvidence struct { AmnesiaEvidence *AmnesiaEvidence `protobuf:"bytes,5,opt,name=amnesia_evidence,json=amnesiaEvidence,proto3,oneof" json:"amnesia_evidence,omitempty"` } type Evidence_PhantomValidatorEvidence struct { PhantomValidatorEvidence *PhantomValidatorEvidence `protobuf:"bytes,6,opt,name=phantom_validator_evidence,json=phantomValidatorEvidence,proto3,oneof" json:"phantom_validator_evidence,omitempty"` } type Evidence_MockEvidence struct { MockEvidence *MockEvidence `protobuf:"bytes,7,opt,name=mock_evidence,json=mockEvidence,proto3,oneof" json:"mock_evidence,omitempty"` } type Evidence_MockRandomEvidence struct { MockRandomEvidence *MockRandomEvidence `protobuf:"bytes,8,opt,name=mock_random_evidence,json=mockRandomEvidence,proto3,oneof" json:"mock_random_evidence,omitempty"` } func (*Evidence_DuplicateVoteEvidence) isEvidence_Sum() {} func (*Evidence_ConflictingHeadersEvidence) isEvidence_Sum() {} func (*Evidence_LunaticValidatorEvidence) isEvidence_Sum() {} func (*Evidence_PotentialAmnesiaEvidence) isEvidence_Sum() {} func (*Evidence_AmnesiaEvidence) isEvidence_Sum() {} func (*Evidence_PhantomValidatorEvidence) isEvidence_Sum() {} func (*Evidence_MockEvidence) isEvidence_Sum() {} func (*Evidence_MockRandomEvidence) isEvidence_Sum() {} func (m *Evidence) GetSum() isEvidence_Sum { if m != nil { return m.Sum } return nil } func (m *Evidence) GetDuplicateVoteEvidence() *DuplicateVoteEvidence { if x, ok := m.GetSum().(*Evidence_DuplicateVoteEvidence); ok { return x.DuplicateVoteEvidence } return nil } func (m *Evidence) GetConflictingHeadersEvidence() *ConflictingHeadersEvidence { if x, ok := m.GetSum().(*Evidence_ConflictingHeadersEvidence); ok { return x.ConflictingHeadersEvidence } return nil } func (m *Evidence) GetLunaticValidatorEvidence() *LunaticValidatorEvidence { if x, ok := m.GetSum().(*Evidence_LunaticValidatorEvidence); ok { return x.LunaticValidatorEvidence } return nil } func (m *Evidence) GetPotentialAmnesiaEvidence() *PotentialAmnesiaEvidence { if x, ok := m.GetSum().(*Evidence_PotentialAmnesiaEvidence); ok { return x.PotentialAmnesiaEvidence } return nil } func (m *Evidence) GetAmnesiaEvidence() *AmnesiaEvidence { if x, ok := m.GetSum().(*Evidence_AmnesiaEvidence); ok { return x.AmnesiaEvidence } return nil } func (m *Evidence) GetPhantomValidatorEvidence() *PhantomValidatorEvidence { if x, ok := m.GetSum().(*Evidence_PhantomValidatorEvidence); ok { return x.PhantomValidatorEvidence } return nil } func (m *Evidence) GetMockEvidence() *MockEvidence { if x, ok := m.GetSum().(*Evidence_MockEvidence); ok { return x.MockEvidence } return nil } func (m *Evidence) GetMockRandomEvidence() *MockRandomEvidence { if x, ok := m.GetSum().(*Evidence_MockRandomEvidence); ok { return x.MockRandomEvidence } return nil } // XXX_OneofWrappers is for the internal use of the proto package. func (*Evidence) XXX_OneofWrappers() []interface{} { return []interface{}{ (*Evidence_DuplicateVoteEvidence)(nil), (*Evidence_ConflictingHeadersEvidence)(nil), (*Evidence_LunaticValidatorEvidence)(nil), (*Evidence_PotentialAmnesiaEvidence)(nil), (*Evidence_AmnesiaEvidence)(nil), (*Evidence_PhantomValidatorEvidence)(nil), (*Evidence_MockEvidence)(nil), (*Evidence_MockRandomEvidence)(nil), } } // EvidenceData contains any evidence of malicious wrong-doing by validators type EvidenceData struct { Evidence []Evidence `protobuf:"bytes,1,rep,name=evidence,proto3" json:"evidence"` Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` } func (m *EvidenceData) Reset() { *m = EvidenceData{} } func (m *EvidenceData) String() string { return proto.CompactTextString(m) } func (*EvidenceData) ProtoMessage() {} func (*EvidenceData) Descriptor() ([]byte, []int) { return fileDescriptor_86495eef24aeacc0, []int{9} } func (m *EvidenceData) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *EvidenceData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_EvidenceData.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 *EvidenceData) XXX_Merge(src proto.Message) { xxx_messageInfo_EvidenceData.Merge(m, src) } func (m *EvidenceData) XXX_Size() int { return m.Size() } func (m *EvidenceData) XXX_DiscardUnknown() { xxx_messageInfo_EvidenceData.DiscardUnknown(m) } var xxx_messageInfo_EvidenceData proto.InternalMessageInfo func (m *EvidenceData) GetEvidence() []Evidence { if m != nil { return m.Evidence } return nil } func (m *EvidenceData) GetHash() []byte { if m != nil { return m.Hash } return nil } type ProofOfLockChange struct { Votes []*Vote `protobuf:"bytes,1,rep,name=votes,proto3" json:"votes,omitempty"` PubKey *keys.PublicKey `protobuf:"bytes,2,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` } func (m *ProofOfLockChange) Reset() { *m = ProofOfLockChange{} } func (m *ProofOfLockChange) String() string { return proto.CompactTextString(m) } func (*ProofOfLockChange) ProtoMessage() {} func (*ProofOfLockChange) Descriptor() ([]byte, []int) { return fileDescriptor_86495eef24aeacc0, []int{10} } func (m *ProofOfLockChange) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ProofOfLockChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ProofOfLockChange.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 *ProofOfLockChange) XXX_Merge(src proto.Message) { xxx_messageInfo_ProofOfLockChange.Merge(m, src) } func (m *ProofOfLockChange) XXX_Size() int { return m.Size() } func (m *ProofOfLockChange) XXX_DiscardUnknown() { xxx_messageInfo_ProofOfLockChange.DiscardUnknown(m) } var xxx_messageInfo_ProofOfLockChange proto.InternalMessageInfo func (m *ProofOfLockChange) GetVotes() []*Vote { if m != nil { return m.Votes } return nil } func (m *ProofOfLockChange) GetPubKey() *keys.PublicKey { if m != nil { return m.PubKey } return nil } func init() { proto.RegisterType((*DuplicateVoteEvidence)(nil), "tendermint.types.DuplicateVoteEvidence") proto.RegisterType((*PotentialAmnesiaEvidence)(nil), "tendermint.types.PotentialAmnesiaEvidence") proto.RegisterType((*AmnesiaEvidence)(nil), "tendermint.types.AmnesiaEvidence") proto.RegisterType((*MockEvidence)(nil), "tendermint.types.MockEvidence") proto.RegisterType((*MockRandomEvidence)(nil), "tendermint.types.MockRandomEvidence") proto.RegisterType((*ConflictingHeadersEvidence)(nil), "tendermint.types.ConflictingHeadersEvidence") proto.RegisterType((*LunaticValidatorEvidence)(nil), "tendermint.types.LunaticValidatorEvidence") proto.RegisterType((*PhantomValidatorEvidence)(nil), "tendermint.types.PhantomValidatorEvidence") proto.RegisterType((*Evidence)(nil), "tendermint.types.Evidence") proto.RegisterType((*EvidenceData)(nil), "tendermint.types.EvidenceData") proto.RegisterType((*ProofOfLockChange)(nil), "tendermint.types.ProofOfLockChange") } func init() { proto.RegisterFile("proto/types/evidence.proto", fileDescriptor_86495eef24aeacc0) } var fileDescriptor_86495eef24aeacc0 = []byte{ // 920 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0x41, 0x6f, 0xdc, 0x44, 0x18, 0xb5, 0xb3, 0x9b, 0x6d, 0xfa, 0x75, 0x4b, 0x82, 0xd5, 0x52, 0x6b, 0xa1, 0x9b, 0xd4, 0x20, 0x5a, 0xaa, 0xe0, 0x6d, 0xc3, 0x01, 0x09, 0x71, 0xc9, 0xb6, 0xa9, 0xb6, 0x6a, 0x81, 0x6a, 0x82, 0x0a, 0xe2, 0x62, 0x66, 0xed, 0x59, 0x7b, 0xba, 0xb6, 0xc7, 0xb2, 0xc7, 0x41, 0x96, 0xe0, 0x27, 0x20, 0xf5, 0xde, 0x7f, 0x80, 0xc4, 0x8d, 0x1f, 0xd1, 0x63, 0xc5, 0x89, 0x13, 0xa0, 0xe4, 0x8f, 0xa0, 0x99, 0xb1, 0xbd, 0x9b, 0x78, 0xdd, 0xc0, 0x05, 0xa9, 0x97, 0x68, 0xf3, 0xcd, 0xf7, 0xbd, 0xf7, 0x66, 0xfc, 0xe6, 0xd9, 0x30, 0x48, 0x52, 0xc6, 0xd9, 0x88, 0x17, 0x09, 0xc9, 0x46, 0xe4, 0x88, 0x7a, 0x24, 0x76, 0x89, 0x2d, 0x8b, 0xc6, 0x16, 0x27, 0xb1, 0x47, 0xd2, 0x88, 0xc6, 0xdc, 0x96, 0x0d, 0x83, 0x0f, 0x79, 0x40, 0x53, 0xcf, 0x49, 0x70, 0xca, 0x8b, 0x91, 0x9a, 0xf4, 0x99, 0xcf, 0x16, 0xbf, 0xd4, 0xe4, 0xe0, 0xda, 0x32, 0xaa, 0xfc, 0x5b, 0x2e, 0x6c, 0xfb, 0x8c, 0xf9, 0x21, 0x51, 0xb3, 0xd3, 0x7c, 0x36, 0xe2, 0x34, 0x22, 0x19, 0xc7, 0x51, 0x52, 0x36, 0x5c, 0x57, 0x93, 0x6e, 0x5a, 0x24, 0x9c, 0x8d, 0xe6, 0xa4, 0x38, 0x35, 0x6f, 0xe5, 0x70, 0xf5, 0x7e, 0x9e, 0x84, 0xd4, 0xc5, 0x9c, 0x3c, 0x65, 0x9c, 0x1c, 0x94, 0x8a, 0x8d, 0x8f, 0xa1, 0x77, 0xc4, 0x38, 0x71, 0xb0, 0xa9, 0xef, 0xe8, 0xb7, 0x2e, 0xed, 0xbd, 0x63, 0x9f, 0x15, 0x6f, 0x8b, 0x7e, 0xb4, 0x2e, 0xba, 0xf6, 0xeb, 0xf6, 0xa9, 0xb9, 0x76, 0x7e, 0xfb, 0xd8, 0x7a, 0xa1, 0x83, 0xf9, 0x84, 0x71, 0x12, 0x73, 0x8a, 0xc3, 0xfd, 0x28, 0x26, 0x19, 0xc5, 0xff, 0x0f, 0xb5, 0x71, 0x03, 0xfa, 0x01, 0xa1, 0x7e, 0xc0, 0x1d, 0x79, 0x4c, 0x66, 0x67, 0x47, 0xbf, 0xd5, 0x41, 0x97, 0x54, 0xed, 0x50, 0x94, 0xac, 0xdf, 0x74, 0xd8, 0x3c, 0x2b, 0x2a, 0x80, 0x41, 0x52, 0x09, 0x76, 0xb0, 0x5a, 0x74, 0xaa, 0xe7, 0x5b, 0x0a, 0xbd, 0xdd, 0x64, 0x6e, 0xdb, 0x24, 0x32, 0x93, 0xb6, 0xed, 0x7f, 0x0a, 0xdd, 0x84, 0x85, 0x6e, 0xb9, 0x9b, 0xf7, 0x57, 0x60, 0xa6, 0x8c, 0xcd, 0xbe, 0x9a, 0x3d, 0x66, 0xee, 0xfc, 0x5e, 0x80, 0x63, 0x9f, 0x20, 0x39, 0x60, 0xfd, 0xaa, 0x43, 0xff, 0x0b, 0xe6, 0xce, 0x6b, 0xa4, 0x9b, 0xb0, 0x59, 0x29, 0x74, 0xd4, 0xfe, 0xa4, 0xd0, 0x0e, 0x7a, 0xab, 0x2a, 0x4f, 0x64, 0xd5, 0x78, 0x08, 0x97, 0xeb, 0x46, 0x61, 0xa0, 0x92, 0x7b, 0x60, 0x2b, 0x77, 0xd9, 0x95, 0xbb, 0xec, 0xaf, 0x2b, 0x77, 0x8d, 0x37, 0x5e, 0xfe, 0xb9, 0xad, 0x3d, 0xff, 0x6b, 0x5b, 0x47, 0xfd, 0x6a, 0x54, 0x2c, 0x1a, 0x1f, 0xc1, 0x56, 0x0d, 0x85, 0x3d, 0x2f, 0x25, 0x59, 0x26, 0x8f, 0xb8, 0x8f, 0x6a, 0x2d, 0xfb, 0xaa, 0x6c, 0xfd, 0xae, 0x83, 0x21, 0xf4, 0x22, 0x1c, 0x7b, 0x2c, 0x7a, 0x43, 0x54, 0x1b, 0xd7, 0x01, 0x52, 0x1c, 0x7b, 0xce, 0xb4, 0xe0, 0x24, 0x33, 0xbb, 0xb2, 0xe9, 0xa2, 0xa8, 0x8c, 0x45, 0xc1, 0xfa, 0x11, 0x06, 0xf7, 0x58, 0x3c, 0x0b, 0xa9, 0xcb, 0x69, 0xec, 0x4f, 0x08, 0xf6, 0x48, 0x9a, 0xd5, 0x7b, 0xb3, 0x61, 0x2d, 0xb8, 0x5b, 0xba, 0x65, 0xd8, 0x7c, 0xb2, 0x87, 0xd4, 0x8f, 0x89, 0xa7, 0x86, 0xd0, 0x5a, 0x70, 0x57, 0xf6, 0xef, 0x95, 0xfb, 0x3a, 0xbf, 0x7f, 0xcf, 0xfa, 0x45, 0x07, 0xf3, 0x71, 0x1e, 0x63, 0x4e, 0xdd, 0xa7, 0x38, 0xa4, 0x1e, 0xe6, 0x2c, 0xad, 0xc9, 0xef, 0x40, 0x2f, 0x90, 0xad, 0xa5, 0x00, 0xb3, 0x09, 0x58, 0x42, 0x95, 0x7d, 0xc6, 0x6d, 0xe8, 0x8a, 0x4b, 0x73, 0xce, 0xc5, 0x92, 0x3d, 0xc6, 0x1d, 0xb8, 0x42, 0xe3, 0x23, 0x41, 0xea, 0xa8, 0x69, 0x67, 0x46, 0x49, 0xe8, 0xc9, 0x63, 0xbc, 0x88, 0x8c, 0x72, 0x4d, 0x11, 0x3c, 0x10, 0x2b, 0xd6, 0xcf, 0x22, 0x04, 0x02, 0x1c, 0x73, 0x16, 0x35, 0xc5, 0x56, 0xd4, 0xfa, 0xbf, 0xa0, 0x3e, 0x80, 0x9d, 0x10, 0x67, 0xbc, 0x74, 0x8b, 0x73, 0x54, 0x81, 0x39, 0x3f, 0xe0, 0xcc, 0xa1, 0xb1, 0x93, 0x11, 0x2e, 0xb7, 0xd0, 0x41, 0xef, 0x8a, 0x3e, 0x65, 0x9f, 0x9a, 0xf2, 0x1b, 0x9c, 0x3d, 0x8c, 0x0f, 0x09, 0xb7, 0x5e, 0xf4, 0x60, 0xa3, 0xe6, 0xc7, 0x70, 0xcd, 0xab, 0x82, 0xd1, 0x91, 0xf9, 0x72, 0xe6, 0xb2, 0xdf, 0x6c, 0x4a, 0x5a, 0x99, 0xa4, 0x13, 0x0d, 0x5d, 0xf5, 0x56, 0x46, 0x6c, 0x02, 0xef, 0xb9, 0x0b, 0xab, 0x94, 0xa7, 0x96, 0x2d, 0x78, 0xd4, 0xa9, 0xef, 0x36, 0x79, 0xda, 0x0d, 0x36, 0xd1, 0xd0, 0xc0, 0x6d, 0xb7, 0xdf, 0x33, 0x18, 0x84, 0xca, 0x1d, 0x4b, 0x87, 0x54, 0xf3, 0x75, 0xda, 0x42, 0xac, 0xcd, 0x51, 0x13, 0x0d, 0x99, 0x61, 0x9b, 0xdb, 0x9e, 0xbd, 0x36, 0x30, 0xbb, 0xff, 0x35, 0x30, 0x05, 0x57, 0x6b, 0x64, 0x7e, 0x09, 0x5b, 0x0d, 0x86, 0x75, 0xc9, 0x70, 0xa3, 0xc9, 0xd0, 0x04, 0xde, 0xc4, 0x67, 0xf0, 0x84, 0x76, 0x65, 0xcc, 0x55, 0xe7, 0xd4, 0x6b, 0xd5, 0xde, 0x62, 0x66, 0xa9, 0xbd, 0xcd, 0xe8, 0x07, 0x70, 0x39, 0x62, 0xee, 0x7c, 0x01, 0x7f, 0xa1, 0xed, 0xb6, 0x2f, 0x67, 0xfb, 0x44, 0x43, 0xfd, 0x68, 0x39, 0xeb, 0xbf, 0x85, 0x2b, 0x12, 0x26, 0x95, 0x61, 0xba, 0x40, 0xdb, 0x90, 0x68, 0x1f, 0xac, 0x46, 0x3b, 0x9d, 0xbc, 0x13, 0x0d, 0x19, 0x51, 0xa3, 0x3a, 0x5e, 0x87, 0x4e, 0x96, 0x47, 0xd6, 0xf7, 0xd0, 0xaf, 0x4a, 0xf7, 0x31, 0xc7, 0xc6, 0xe7, 0xb0, 0xb1, 0x74, 0x23, 0x3a, 0x32, 0x78, 0x1b, 0x24, 0x35, 0x48, 0x57, 0x04, 0x2f, 0xaa, 0x27, 0x0c, 0x03, 0xba, 0x01, 0xce, 0x02, 0xe9, 0xf1, 0x3e, 0x92, 0xbf, 0xad, 0x9f, 0xe0, 0xed, 0xc6, 0xab, 0xcd, 0xd8, 0x05, 0xf9, 0xde, 0xce, 0x4a, 0x8e, 0xd7, 0xbe, 0xdc, 0x33, 0xe3, 0x33, 0xb8, 0x90, 0xe4, 0x53, 0x67, 0x4e, 0x8a, 0xf2, 0xf6, 0x9c, 0x7a, 0xfe, 0xea, 0x23, 0xc8, 0x16, 0x1f, 0x41, 0xf6, 0x93, 0x7c, 0x1a, 0x52, 0xf7, 0x11, 0x29, 0x50, 0x2f, 0xc9, 0xa7, 0x8f, 0x48, 0x31, 0x7e, 0xf0, 0xf2, 0x78, 0xa8, 0xbf, 0x3a, 0x1e, 0xea, 0x7f, 0x1f, 0x0f, 0xf5, 0xe7, 0x27, 0x43, 0xed, 0xd5, 0xc9, 0x50, 0xfb, 0xe3, 0x64, 0xa8, 0x7d, 0xb7, 0xeb, 0x53, 0x1e, 0xe4, 0x53, 0xdb, 0x65, 0xd1, 0x68, 0x01, 0xb7, 0xfc, 0x73, 0xe9, 0xf3, 0x6c, 0xda, 0x93, 0xff, 0x7c, 0xf2, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x76, 0x34, 0xd7, 0x0a, 0x0a, 0x00, 0x00, } func (m *DuplicateVoteEvidence) 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 *DuplicateVoteEvidence) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *DuplicateVoteEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.VoteB != nil { { size, err := m.VoteB.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintEvidence(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if m.VoteA != nil { { size, err := m.VoteA.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintEvidence(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *PotentialAmnesiaEvidence) 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 *PotentialAmnesiaEvidence) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PotentialAmnesiaEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.HeightStamp != 0 { i = encodeVarintEvidence(dAtA, i, uint64(m.HeightStamp)) i-- dAtA[i] = 0x18 } if m.VoteB != nil { { size, err := m.VoteB.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintEvidence(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if m.VoteA != nil { { size, err := m.VoteA.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintEvidence(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *AmnesiaEvidence) 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 *AmnesiaEvidence) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *AmnesiaEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Polc != nil { { size, err := m.Polc.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintEvidence(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if m.PotentialAmnesiaEvidence != nil { { size, err := m.PotentialAmnesiaEvidence.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintEvidence(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MockEvidence) 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 *MockEvidence) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MockEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.EvidenceAddress) > 0 { i -= len(m.EvidenceAddress) copy(dAtA[i:], m.EvidenceAddress) i = encodeVarintEvidence(dAtA, i, uint64(len(m.EvidenceAddress))) i-- dAtA[i] = 0x1a } n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.EvidenceTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.EvidenceTime):]) if err7 != nil { return 0, err7 } i -= n7 i = encodeVarintEvidence(dAtA, i, uint64(n7)) i-- dAtA[i] = 0x12 if m.EvidenceHeight != 0 { i = encodeVarintEvidence(dAtA, i, uint64(m.EvidenceHeight)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *MockRandomEvidence) 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 *MockRandomEvidence) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MockRandomEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.RandBytes) > 0 { i -= len(m.RandBytes) copy(dAtA[i:], m.RandBytes) i = encodeVarintEvidence(dAtA, i, uint64(len(m.RandBytes))) i-- dAtA[i] = 0x22 } if len(m.EvidenceAddress) > 0 { i -= len(m.EvidenceAddress) copy(dAtA[i:], m.EvidenceAddress) i = encodeVarintEvidence(dAtA, i, uint64(len(m.EvidenceAddress))) i-- dAtA[i] = 0x1a } n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.EvidenceTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.EvidenceTime):]) if err8 != nil { return 0, err8 } i -= n8 i = encodeVarintEvidence(dAtA, i, uint64(n8)) i-- dAtA[i] = 0x12 if m.EvidenceHeight != 0 { i = encodeVarintEvidence(dAtA, i, uint64(m.EvidenceHeight)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *ConflictingHeadersEvidence) 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 *ConflictingHeadersEvidence) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ConflictingHeadersEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.H2 != nil { { size, err := m.H2.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintEvidence(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if m.H1 != nil { { size, err := m.H1.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintEvidence(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *LunaticValidatorEvidence) 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 *LunaticValidatorEvidence) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *LunaticValidatorEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.InvalidHeaderField) > 0 { i -= len(m.InvalidHeaderField) copy(dAtA[i:], m.InvalidHeaderField) i = encodeVarintEvidence(dAtA, i, uint64(len(m.InvalidHeaderField))) i-- dAtA[i] = 0x1a } if m.Vote != nil { { size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintEvidence(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 = encodeVarintEvidence(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *PhantomValidatorEvidence) 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 *PhantomValidatorEvidence) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PhantomValidatorEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.LastHeightValidatorWasInSet != 0 { i = encodeVarintEvidence(dAtA, i, uint64(m.LastHeightValidatorWasInSet)) i-- dAtA[i] = 0x10 } if m.Vote != nil { { size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintEvidence(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *Evidence) 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 *Evidence) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Evidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Sum != nil { { size := m.Sum.Size() i -= size if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { return 0, err } } } return len(dAtA) - i, nil } func (m *Evidence_DuplicateVoteEvidence) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Evidence_DuplicateVoteEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.DuplicateVoteEvidence != nil { { size, err := m.DuplicateVoteEvidence.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintEvidence(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *Evidence_ConflictingHeadersEvidence) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Evidence_ConflictingHeadersEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.ConflictingHeadersEvidence != nil { { size, err := m.ConflictingHeadersEvidence.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintEvidence(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } return len(dAtA) - i, nil } func (m *Evidence_LunaticValidatorEvidence) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Evidence_LunaticValidatorEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.LunaticValidatorEvidence != nil { { size, err := m.LunaticValidatorEvidence.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintEvidence(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } return len(dAtA) - i, nil } func (m *Evidence_PotentialAmnesiaEvidence) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Evidence_PotentialAmnesiaEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.PotentialAmnesiaEvidence != nil { { size, err := m.PotentialAmnesiaEvidence.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintEvidence(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 } return len(dAtA) - i, nil } func (m *Evidence_AmnesiaEvidence) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Evidence_AmnesiaEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.AmnesiaEvidence != nil { { size, err := m.AmnesiaEvidence.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintEvidence(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x2a } return len(dAtA) - i, nil } func (m *Evidence_PhantomValidatorEvidence) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Evidence_PhantomValidatorEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.PhantomValidatorEvidence != nil { { size, err := m.PhantomValidatorEvidence.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintEvidence(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x32 } return len(dAtA) - i, nil } func (m *Evidence_MockEvidence) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Evidence_MockEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.MockEvidence != nil { { size, err := m.MockEvidence.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintEvidence(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x3a } return len(dAtA) - i, nil } func (m *Evidence_MockRandomEvidence) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Evidence_MockRandomEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.MockRandomEvidence != nil { { size, err := m.MockRandomEvidence.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintEvidence(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x42 } return len(dAtA) - i, nil } func (m *EvidenceData) 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 *EvidenceData) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *EvidenceData) 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 = encodeVarintEvidence(dAtA, i, uint64(len(m.Hash))) i-- dAtA[i] = 0x12 } if len(m.Evidence) > 0 { for iNdEx := len(m.Evidence) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Evidence[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintEvidence(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *ProofOfLockChange) 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 *ProofOfLockChange) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ProofOfLockChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.PubKey != nil { { size, err := m.PubKey.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintEvidence(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if len(m.Votes) > 0 { for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Votes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintEvidence(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func encodeVarintEvidence(dAtA []byte, offset int, v uint64) int { offset -= sovEvidence(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *DuplicateVoteEvidence) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.VoteA != nil { l = m.VoteA.Size() n += 1 + l + sovEvidence(uint64(l)) } if m.VoteB != nil { l = m.VoteB.Size() n += 1 + l + sovEvidence(uint64(l)) } return n } func (m *PotentialAmnesiaEvidence) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.VoteA != nil { l = m.VoteA.Size() n += 1 + l + sovEvidence(uint64(l)) } if m.VoteB != nil { l = m.VoteB.Size() n += 1 + l + sovEvidence(uint64(l)) } if m.HeightStamp != 0 { n += 1 + sovEvidence(uint64(m.HeightStamp)) } return n } func (m *AmnesiaEvidence) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.PotentialAmnesiaEvidence != nil { l = m.PotentialAmnesiaEvidence.Size() n += 1 + l + sovEvidence(uint64(l)) } if m.Polc != nil { l = m.Polc.Size() n += 1 + l + sovEvidence(uint64(l)) } return n } func (m *MockEvidence) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.EvidenceHeight != 0 { n += 1 + sovEvidence(uint64(m.EvidenceHeight)) } l = github_com_gogo_protobuf_types.SizeOfStdTime(m.EvidenceTime) n += 1 + l + sovEvidence(uint64(l)) l = len(m.EvidenceAddress) if l > 0 { n += 1 + l + sovEvidence(uint64(l)) } return n } func (m *MockRandomEvidence) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.EvidenceHeight != 0 { n += 1 + sovEvidence(uint64(m.EvidenceHeight)) } l = github_com_gogo_protobuf_types.SizeOfStdTime(m.EvidenceTime) n += 1 + l + sovEvidence(uint64(l)) l = len(m.EvidenceAddress) if l > 0 { n += 1 + l + sovEvidence(uint64(l)) } l = len(m.RandBytes) if l > 0 { n += 1 + l + sovEvidence(uint64(l)) } return n } func (m *ConflictingHeadersEvidence) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.H1 != nil { l = m.H1.Size() n += 1 + l + sovEvidence(uint64(l)) } if m.H2 != nil { l = m.H2.Size() n += 1 + l + sovEvidence(uint64(l)) } return n } func (m *LunaticValidatorEvidence) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Header != nil { l = m.Header.Size() n += 1 + l + sovEvidence(uint64(l)) } if m.Vote != nil { l = m.Vote.Size() n += 1 + l + sovEvidence(uint64(l)) } l = len(m.InvalidHeaderField) if l > 0 { n += 1 + l + sovEvidence(uint64(l)) } return n } func (m *PhantomValidatorEvidence) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Vote != nil { l = m.Vote.Size() n += 1 + l + sovEvidence(uint64(l)) } if m.LastHeightValidatorWasInSet != 0 { n += 1 + sovEvidence(uint64(m.LastHeightValidatorWasInSet)) } return n } func (m *Evidence) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Sum != nil { n += m.Sum.Size() } return n } func (m *Evidence_DuplicateVoteEvidence) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.DuplicateVoteEvidence != nil { l = m.DuplicateVoteEvidence.Size() n += 1 + l + sovEvidence(uint64(l)) } return n } func (m *Evidence_ConflictingHeadersEvidence) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.ConflictingHeadersEvidence != nil { l = m.ConflictingHeadersEvidence.Size() n += 1 + l + sovEvidence(uint64(l)) } return n } func (m *Evidence_LunaticValidatorEvidence) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.LunaticValidatorEvidence != nil { l = m.LunaticValidatorEvidence.Size() n += 1 + l + sovEvidence(uint64(l)) } return n } func (m *Evidence_PotentialAmnesiaEvidence) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.PotentialAmnesiaEvidence != nil { l = m.PotentialAmnesiaEvidence.Size() n += 1 + l + sovEvidence(uint64(l)) } return n } func (m *Evidence_AmnesiaEvidence) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.AmnesiaEvidence != nil { l = m.AmnesiaEvidence.Size() n += 1 + l + sovEvidence(uint64(l)) } return n } func (m *Evidence_PhantomValidatorEvidence) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.PhantomValidatorEvidence != nil { l = m.PhantomValidatorEvidence.Size() n += 1 + l + sovEvidence(uint64(l)) } return n } func (m *Evidence_MockEvidence) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.MockEvidence != nil { l = m.MockEvidence.Size() n += 1 + l + sovEvidence(uint64(l)) } return n } func (m *Evidence_MockRandomEvidence) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.MockRandomEvidence != nil { l = m.MockRandomEvidence.Size() n += 1 + l + sovEvidence(uint64(l)) } return n } func (m *EvidenceData) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Evidence) > 0 { for _, e := range m.Evidence { l = e.Size() n += 1 + l + sovEvidence(uint64(l)) } } l = len(m.Hash) if l > 0 { n += 1 + l + sovEvidence(uint64(l)) } return n } func (m *ProofOfLockChange) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Votes) > 0 { for _, e := range m.Votes { l = e.Size() n += 1 + l + sovEvidence(uint64(l)) } } if m.PubKey != nil { l = m.PubKey.Size() n += 1 + l + sovEvidence(uint64(l)) } return n } func sovEvidence(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozEvidence(x uint64) (n int) { return sovEvidence(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *DuplicateVoteEvidence) 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 ErrIntOverflowEvidence } 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: DuplicateVoteEvidence: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: DuplicateVoteEvidence: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field VoteA", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } if m.VoteA == nil { m.VoteA = &Vote{} } if err := m.VoteA.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field VoteB", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } if m.VoteB == nil { m.VoteB = &Vote{} } if err := m.VoteB.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvidence(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthEvidence } if (iNdEx + skippy) < 0 { return ErrInvalidLengthEvidence } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *PotentialAmnesiaEvidence) 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 ErrIntOverflowEvidence } 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: PotentialAmnesiaEvidence: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: PotentialAmnesiaEvidence: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field VoteA", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } if m.VoteA == nil { m.VoteA = &Vote{} } if err := m.VoteA.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field VoteB", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } if m.VoteB == nil { m.VoteB = &Vote{} } if err := m.VoteB.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field HeightStamp", wireType) } m.HeightStamp = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.HeightStamp |= int64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipEvidence(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthEvidence } if (iNdEx + skippy) < 0 { return ErrInvalidLengthEvidence } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *AmnesiaEvidence) 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 ErrIntOverflowEvidence } 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: AmnesiaEvidence: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: AmnesiaEvidence: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PotentialAmnesiaEvidence", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } if m.PotentialAmnesiaEvidence == nil { m.PotentialAmnesiaEvidence = &PotentialAmnesiaEvidence{} } if err := m.PotentialAmnesiaEvidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Polc", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } if m.Polc == nil { m.Polc = &ProofOfLockChange{} } if err := m.Polc.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvidence(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthEvidence } if (iNdEx + skippy) < 0 { return ErrInvalidLengthEvidence } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *MockEvidence) 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 ErrIntOverflowEvidence } 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: MockEvidence: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MockEvidence: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field EvidenceHeight", wireType) } m.EvidenceHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.EvidenceHeight |= int64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EvidenceTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.EvidenceTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EvidenceAddress", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } m.EvidenceAddress = append(m.EvidenceAddress[:0], dAtA[iNdEx:postIndex]...) if m.EvidenceAddress == nil { m.EvidenceAddress = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvidence(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthEvidence } if (iNdEx + skippy) < 0 { return ErrInvalidLengthEvidence } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *MockRandomEvidence) 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 ErrIntOverflowEvidence } 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: MockRandomEvidence: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MockRandomEvidence: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field EvidenceHeight", wireType) } m.EvidenceHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.EvidenceHeight |= int64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EvidenceTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.EvidenceTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EvidenceAddress", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } m.EvidenceAddress = append(m.EvidenceAddress[:0], dAtA[iNdEx:postIndex]...) if m.EvidenceAddress == nil { m.EvidenceAddress = []byte{} } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RandBytes", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } m.RandBytes = append(m.RandBytes[:0], dAtA[iNdEx:postIndex]...) if m.RandBytes == nil { m.RandBytes = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvidence(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthEvidence } if (iNdEx + skippy) < 0 { return ErrInvalidLengthEvidence } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ConflictingHeadersEvidence) 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 ErrIntOverflowEvidence } 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: ConflictingHeadersEvidence: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ConflictingHeadersEvidence: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field H1", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } if m.H1 == nil { m.H1 = &SignedHeader{} } if err := m.H1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field H2", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } if m.H2 == nil { m.H2 = &SignedHeader{} } if err := m.H2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvidence(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthEvidence } if (iNdEx + skippy) < 0 { return ErrInvalidLengthEvidence } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *LunaticValidatorEvidence) 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 ErrIntOverflowEvidence } 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: LunaticValidatorEvidence: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: LunaticValidatorEvidence: 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 ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthEvidence } 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 Vote", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } if m.Vote == nil { m.Vote = &Vote{} } if err := m.Vote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field InvalidHeaderField", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } 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 ErrInvalidLengthEvidence } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } m.InvalidHeaderField = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvidence(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthEvidence } if (iNdEx + skippy) < 0 { return ErrInvalidLengthEvidence } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *PhantomValidatorEvidence) 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 ErrIntOverflowEvidence } 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: PhantomValidatorEvidence: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: PhantomValidatorEvidence: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } if m.Vote == nil { m.Vote = &Vote{} } if err := m.Vote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field LastHeightValidatorWasInSet", wireType) } m.LastHeightValidatorWasInSet = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.LastHeightValidatorWasInSet |= int64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipEvidence(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthEvidence } if (iNdEx + skippy) < 0 { return ErrInvalidLengthEvidence } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Evidence) 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 ErrIntOverflowEvidence } 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: Evidence: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Evidence: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DuplicateVoteEvidence", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } v := &DuplicateVoteEvidence{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Sum = &Evidence_DuplicateVoteEvidence{v} iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ConflictingHeadersEvidence", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } v := &ConflictingHeadersEvidence{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Sum = &Evidence_ConflictingHeadersEvidence{v} iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LunaticValidatorEvidence", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } v := &LunaticValidatorEvidence{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Sum = &Evidence_LunaticValidatorEvidence{v} iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PotentialAmnesiaEvidence", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } v := &PotentialAmnesiaEvidence{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Sum = &Evidence_PotentialAmnesiaEvidence{v} iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AmnesiaEvidence", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } v := &AmnesiaEvidence{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Sum = &Evidence_AmnesiaEvidence{v} iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PhantomValidatorEvidence", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } v := &PhantomValidatorEvidence{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Sum = &Evidence_PhantomValidatorEvidence{v} iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MockEvidence", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } v := &MockEvidence{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Sum = &Evidence_MockEvidence{v} iNdEx = postIndex case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MockRandomEvidence", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } v := &MockRandomEvidence{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Sum = &Evidence_MockRandomEvidence{v} iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvidence(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthEvidence } if (iNdEx + skippy) < 0 { return ErrInvalidLengthEvidence } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *EvidenceData) 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 ErrIntOverflowEvidence } 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: EvidenceData: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: EvidenceData: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } m.Evidence = append(m.Evidence, Evidence{}) if err := m.Evidence[len(m.Evidence)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } 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 ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthEvidence } 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 := skipEvidence(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthEvidence } if (iNdEx + skippy) < 0 { return ErrInvalidLengthEvidence } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ProofOfLockChange) 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 ErrIntOverflowEvidence } 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: ProofOfLockChange: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ProofOfLockChange: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } m.Votes = append(m.Votes, &Vote{}) if err := m.Votes[len(m.Votes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PubKey", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvidence } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } if m.PubKey == nil { m.PubKey = &keys.PublicKey{} } if err := m.PubKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvidence(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthEvidence } if (iNdEx + skippy) < 0 { return ErrInvalidLengthEvidence } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipEvidence(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, ErrIntOverflowEvidence } 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, ErrIntOverflowEvidence } 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, ErrIntOverflowEvidence } 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, ErrInvalidLengthEvidence } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupEvidence } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthEvidence } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthEvidence = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowEvidence = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupEvidence = fmt.Errorf("proto: unexpected end of group") )