github.com/adoriasoft/tendermint@v0.34.0-dev1.0.20200722151356-96d84601a75a/proto/tendermint/evidence/types.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: tendermint/evidence/types.proto
     3  
     4  package evidence
     5  
     6  import (
     7  	fmt "fmt"
     8  	types "github.com/adoriasoft/tendermint/proto/tendermint/types"
     9  	_ "github.com/gogo/protobuf/gogoproto"
    10  	proto "github.com/gogo/protobuf/proto"
    11  	io "io"
    12  	math "math"
    13  	math_bits "math/bits"
    14  )
    15  
    16  // Reference imports to suppress errors if they are not otherwise used.
    17  var _ = proto.Marshal
    18  var _ = fmt.Errorf
    19  var _ = math.Inf
    20  
    21  // This is a compile-time assertion to ensure that this generated file
    22  // is compatible with the proto package it is being compiled against.
    23  // A compilation error at this line likely means your copy of the
    24  // proto package needs to be updated.
    25  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    26  
    27  type List struct {
    28  	Evidence []*types.Evidence `protobuf:"bytes,1,rep,name=evidence,proto3" json:"evidence,omitempty"`
    29  }
    30  
    31  func (m *List) Reset()         { *m = List{} }
    32  func (m *List) String() string { return proto.CompactTextString(m) }
    33  func (*List) ProtoMessage()    {}
    34  func (*List) Descriptor() ([]byte, []int) {
    35  	return fileDescriptor_5e804d1c041a0e47, []int{0}
    36  }
    37  func (m *List) XXX_Unmarshal(b []byte) error {
    38  	return m.Unmarshal(b)
    39  }
    40  func (m *List) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    41  	if deterministic {
    42  		return xxx_messageInfo_List.Marshal(b, m, deterministic)
    43  	} else {
    44  		b = b[:cap(b)]
    45  		n, err := m.MarshalToSizedBuffer(b)
    46  		if err != nil {
    47  			return nil, err
    48  		}
    49  		return b[:n], nil
    50  	}
    51  }
    52  func (m *List) XXX_Merge(src proto.Message) {
    53  	xxx_messageInfo_List.Merge(m, src)
    54  }
    55  func (m *List) XXX_Size() int {
    56  	return m.Size()
    57  }
    58  func (m *List) XXX_DiscardUnknown() {
    59  	xxx_messageInfo_List.DiscardUnknown(m)
    60  }
    61  
    62  var xxx_messageInfo_List proto.InternalMessageInfo
    63  
    64  func (m *List) GetEvidence() []*types.Evidence {
    65  	if m != nil {
    66  		return m.Evidence
    67  	}
    68  	return nil
    69  }
    70  
    71  type Info struct {
    72  	Committed bool           `protobuf:"varint,1,opt,name=committed,proto3" json:"committed,omitempty"`
    73  	Priority  int64          `protobuf:"varint,2,opt,name=priority,proto3" json:"priority,omitempty"`
    74  	Evidence  types.Evidence `protobuf:"bytes,3,opt,name=evidence,proto3" json:"evidence"`
    75  }
    76  
    77  func (m *Info) Reset()         { *m = Info{} }
    78  func (m *Info) String() string { return proto.CompactTextString(m) }
    79  func (*Info) ProtoMessage()    {}
    80  func (*Info) Descriptor() ([]byte, []int) {
    81  	return fileDescriptor_5e804d1c041a0e47, []int{1}
    82  }
    83  func (m *Info) XXX_Unmarshal(b []byte) error {
    84  	return m.Unmarshal(b)
    85  }
    86  func (m *Info) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    87  	if deterministic {
    88  		return xxx_messageInfo_Info.Marshal(b, m, deterministic)
    89  	} else {
    90  		b = b[:cap(b)]
    91  		n, err := m.MarshalToSizedBuffer(b)
    92  		if err != nil {
    93  			return nil, err
    94  		}
    95  		return b[:n], nil
    96  	}
    97  }
    98  func (m *Info) XXX_Merge(src proto.Message) {
    99  	xxx_messageInfo_Info.Merge(m, src)
   100  }
   101  func (m *Info) XXX_Size() int {
   102  	return m.Size()
   103  }
   104  func (m *Info) XXX_DiscardUnknown() {
   105  	xxx_messageInfo_Info.DiscardUnknown(m)
   106  }
   107  
   108  var xxx_messageInfo_Info proto.InternalMessageInfo
   109  
   110  func (m *Info) GetCommitted() bool {
   111  	if m != nil {
   112  		return m.Committed
   113  	}
   114  	return false
   115  }
   116  
   117  func (m *Info) GetPriority() int64 {
   118  	if m != nil {
   119  		return m.Priority
   120  	}
   121  	return 0
   122  }
   123  
   124  func (m *Info) GetEvidence() types.Evidence {
   125  	if m != nil {
   126  		return m.Evidence
   127  	}
   128  	return types.Evidence{}
   129  }
   130  
   131  func init() {
   132  	proto.RegisterType((*List)(nil), "tendermint.evidence.List")
   133  	proto.RegisterType((*Info)(nil), "tendermint.evidence.Info")
   134  }
   135  
   136  func init() { proto.RegisterFile("tendermint/evidence/types.proto", fileDescriptor_5e804d1c041a0e47) }
   137  
   138  var fileDescriptor_5e804d1c041a0e47 = []byte{
   139  	// 252 bytes of a gzipped FileDescriptorProto
   140  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2f, 0x49, 0xcd, 0x4b,
   141  	0x49, 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x4f, 0x2d, 0xcb, 0x4c, 0x49, 0xcd, 0x4b, 0x4e, 0xd5,
   142  	0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x46, 0x28, 0xd0,
   143  	0x83, 0x29, 0x90, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xcb, 0xeb, 0x83, 0x58, 0x10, 0xa5, 0x52,
   144  	0xc8, 0x66, 0x81, 0x8d, 0x80, 0x9b, 0x08, 0x51, 0xa0, 0x64, 0xc7, 0xc5, 0xe2, 0x93, 0x59, 0x5c,
   145  	0x22, 0x64, 0xc6, 0xc5, 0x01, 0x93, 0x91, 0x60, 0x54, 0x60, 0xd6, 0xe0, 0x36, 0x92, 0xd2, 0x43,
   146  	0xb2, 0x06, 0x62, 0xbd, 0x2b, 0x54, 0x45, 0x10, 0x5c, 0xad, 0x52, 0x1d, 0x17, 0x8b, 0x67, 0x5e,
   147  	0x5a, 0xbe, 0x90, 0x0c, 0x17, 0x67, 0x72, 0x7e, 0x6e, 0x6e, 0x66, 0x49, 0x49, 0x6a, 0x8a, 0x04,
   148  	0xa3, 0x02, 0xa3, 0x06, 0x47, 0x10, 0x42, 0x40, 0x48, 0x8a, 0x8b, 0xa3, 0xa0, 0x28, 0x33, 0xbf,
   149  	0x28, 0xb3, 0xa4, 0x52, 0x82, 0x49, 0x81, 0x51, 0x83, 0x39, 0x08, 0xce, 0x17, 0xb2, 0x41, 0xb2,
   150  	0x99, 0x59, 0x81, 0x11, 0xbf, 0xcd, 0x4e, 0x2c, 0x27, 0xee, 0xc9, 0x33, 0x20, 0xec, 0x77, 0x0a,
   151  	0x39, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96,
   152  	0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xab, 0xf4, 0xcc, 0x92, 0x8c,
   153  	0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0xc4, 0x94, 0xfc, 0xa2, 0xcc, 0xc4, 0xe2, 0xfc, 0xb4,
   154  	0x12, 0x7d, 0xa4, 0x00, 0x81, 0x84, 0x16, 0x96, 0xd0, 0x4e, 0x62, 0x03, 0x4b, 0x19, 0x03, 0x02,
   155  	0x00, 0x00, 0xff, 0xff, 0xd1, 0xa4, 0x8d, 0xa9, 0x8b, 0x01, 0x00, 0x00,
   156  }
   157  
   158  func (m *List) Marshal() (dAtA []byte, err error) {
   159  	size := m.Size()
   160  	dAtA = make([]byte, size)
   161  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   162  	if err != nil {
   163  		return nil, err
   164  	}
   165  	return dAtA[:n], nil
   166  }
   167  
   168  func (m *List) MarshalTo(dAtA []byte) (int, error) {
   169  	size := m.Size()
   170  	return m.MarshalToSizedBuffer(dAtA[:size])
   171  }
   172  
   173  func (m *List) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   174  	i := len(dAtA)
   175  	_ = i
   176  	var l int
   177  	_ = l
   178  	if len(m.Evidence) > 0 {
   179  		for iNdEx := len(m.Evidence) - 1; iNdEx >= 0; iNdEx-- {
   180  			{
   181  				size, err := m.Evidence[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   182  				if err != nil {
   183  					return 0, err
   184  				}
   185  				i -= size
   186  				i = encodeVarintTypes(dAtA, i, uint64(size))
   187  			}
   188  			i--
   189  			dAtA[i] = 0xa
   190  		}
   191  	}
   192  	return len(dAtA) - i, nil
   193  }
   194  
   195  func (m *Info) Marshal() (dAtA []byte, err error) {
   196  	size := m.Size()
   197  	dAtA = make([]byte, size)
   198  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   199  	if err != nil {
   200  		return nil, err
   201  	}
   202  	return dAtA[:n], nil
   203  }
   204  
   205  func (m *Info) MarshalTo(dAtA []byte) (int, error) {
   206  	size := m.Size()
   207  	return m.MarshalToSizedBuffer(dAtA[:size])
   208  }
   209  
   210  func (m *Info) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   211  	i := len(dAtA)
   212  	_ = i
   213  	var l int
   214  	_ = l
   215  	{
   216  		size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i])
   217  		if err != nil {
   218  			return 0, err
   219  		}
   220  		i -= size
   221  		i = encodeVarintTypes(dAtA, i, uint64(size))
   222  	}
   223  	i--
   224  	dAtA[i] = 0x1a
   225  	if m.Priority != 0 {
   226  		i = encodeVarintTypes(dAtA, i, uint64(m.Priority))
   227  		i--
   228  		dAtA[i] = 0x10
   229  	}
   230  	if m.Committed {
   231  		i--
   232  		if m.Committed {
   233  			dAtA[i] = 1
   234  		} else {
   235  			dAtA[i] = 0
   236  		}
   237  		i--
   238  		dAtA[i] = 0x8
   239  	}
   240  	return len(dAtA) - i, nil
   241  }
   242  
   243  func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
   244  	offset -= sovTypes(v)
   245  	base := offset
   246  	for v >= 1<<7 {
   247  		dAtA[offset] = uint8(v&0x7f | 0x80)
   248  		v >>= 7
   249  		offset++
   250  	}
   251  	dAtA[offset] = uint8(v)
   252  	return base
   253  }
   254  func (m *List) Size() (n int) {
   255  	if m == nil {
   256  		return 0
   257  	}
   258  	var l int
   259  	_ = l
   260  	if len(m.Evidence) > 0 {
   261  		for _, e := range m.Evidence {
   262  			l = e.Size()
   263  			n += 1 + l + sovTypes(uint64(l))
   264  		}
   265  	}
   266  	return n
   267  }
   268  
   269  func (m *Info) Size() (n int) {
   270  	if m == nil {
   271  		return 0
   272  	}
   273  	var l int
   274  	_ = l
   275  	if m.Committed {
   276  		n += 2
   277  	}
   278  	if m.Priority != 0 {
   279  		n += 1 + sovTypes(uint64(m.Priority))
   280  	}
   281  	l = m.Evidence.Size()
   282  	n += 1 + l + sovTypes(uint64(l))
   283  	return n
   284  }
   285  
   286  func sovTypes(x uint64) (n int) {
   287  	return (math_bits.Len64(x|1) + 6) / 7
   288  }
   289  func sozTypes(x uint64) (n int) {
   290  	return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   291  }
   292  func (m *List) Unmarshal(dAtA []byte) error {
   293  	l := len(dAtA)
   294  	iNdEx := 0
   295  	for iNdEx < l {
   296  		preIndex := iNdEx
   297  		var wire uint64
   298  		for shift := uint(0); ; shift += 7 {
   299  			if shift >= 64 {
   300  				return ErrIntOverflowTypes
   301  			}
   302  			if iNdEx >= l {
   303  				return io.ErrUnexpectedEOF
   304  			}
   305  			b := dAtA[iNdEx]
   306  			iNdEx++
   307  			wire |= uint64(b&0x7F) << shift
   308  			if b < 0x80 {
   309  				break
   310  			}
   311  		}
   312  		fieldNum := int32(wire >> 3)
   313  		wireType := int(wire & 0x7)
   314  		if wireType == 4 {
   315  			return fmt.Errorf("proto: List: wiretype end group for non-group")
   316  		}
   317  		if fieldNum <= 0 {
   318  			return fmt.Errorf("proto: List: illegal tag %d (wire type %d)", fieldNum, wire)
   319  		}
   320  		switch fieldNum {
   321  		case 1:
   322  			if wireType != 2 {
   323  				return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType)
   324  			}
   325  			var msglen int
   326  			for shift := uint(0); ; shift += 7 {
   327  				if shift >= 64 {
   328  					return ErrIntOverflowTypes
   329  				}
   330  				if iNdEx >= l {
   331  					return io.ErrUnexpectedEOF
   332  				}
   333  				b := dAtA[iNdEx]
   334  				iNdEx++
   335  				msglen |= int(b&0x7F) << shift
   336  				if b < 0x80 {
   337  					break
   338  				}
   339  			}
   340  			if msglen < 0 {
   341  				return ErrInvalidLengthTypes
   342  			}
   343  			postIndex := iNdEx + msglen
   344  			if postIndex < 0 {
   345  				return ErrInvalidLengthTypes
   346  			}
   347  			if postIndex > l {
   348  				return io.ErrUnexpectedEOF
   349  			}
   350  			m.Evidence = append(m.Evidence, &types.Evidence{})
   351  			if err := m.Evidence[len(m.Evidence)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   352  				return err
   353  			}
   354  			iNdEx = postIndex
   355  		default:
   356  			iNdEx = preIndex
   357  			skippy, err := skipTypes(dAtA[iNdEx:])
   358  			if err != nil {
   359  				return err
   360  			}
   361  			if skippy < 0 {
   362  				return ErrInvalidLengthTypes
   363  			}
   364  			if (iNdEx + skippy) < 0 {
   365  				return ErrInvalidLengthTypes
   366  			}
   367  			if (iNdEx + skippy) > l {
   368  				return io.ErrUnexpectedEOF
   369  			}
   370  			iNdEx += skippy
   371  		}
   372  	}
   373  
   374  	if iNdEx > l {
   375  		return io.ErrUnexpectedEOF
   376  	}
   377  	return nil
   378  }
   379  func (m *Info) Unmarshal(dAtA []byte) error {
   380  	l := len(dAtA)
   381  	iNdEx := 0
   382  	for iNdEx < l {
   383  		preIndex := iNdEx
   384  		var wire uint64
   385  		for shift := uint(0); ; shift += 7 {
   386  			if shift >= 64 {
   387  				return ErrIntOverflowTypes
   388  			}
   389  			if iNdEx >= l {
   390  				return io.ErrUnexpectedEOF
   391  			}
   392  			b := dAtA[iNdEx]
   393  			iNdEx++
   394  			wire |= uint64(b&0x7F) << shift
   395  			if b < 0x80 {
   396  				break
   397  			}
   398  		}
   399  		fieldNum := int32(wire >> 3)
   400  		wireType := int(wire & 0x7)
   401  		if wireType == 4 {
   402  			return fmt.Errorf("proto: Info: wiretype end group for non-group")
   403  		}
   404  		if fieldNum <= 0 {
   405  			return fmt.Errorf("proto: Info: illegal tag %d (wire type %d)", fieldNum, wire)
   406  		}
   407  		switch fieldNum {
   408  		case 1:
   409  			if wireType != 0 {
   410  				return fmt.Errorf("proto: wrong wireType = %d for field Committed", wireType)
   411  			}
   412  			var v int
   413  			for shift := uint(0); ; shift += 7 {
   414  				if shift >= 64 {
   415  					return ErrIntOverflowTypes
   416  				}
   417  				if iNdEx >= l {
   418  					return io.ErrUnexpectedEOF
   419  				}
   420  				b := dAtA[iNdEx]
   421  				iNdEx++
   422  				v |= int(b&0x7F) << shift
   423  				if b < 0x80 {
   424  					break
   425  				}
   426  			}
   427  			m.Committed = bool(v != 0)
   428  		case 2:
   429  			if wireType != 0 {
   430  				return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType)
   431  			}
   432  			m.Priority = 0
   433  			for shift := uint(0); ; shift += 7 {
   434  				if shift >= 64 {
   435  					return ErrIntOverflowTypes
   436  				}
   437  				if iNdEx >= l {
   438  					return io.ErrUnexpectedEOF
   439  				}
   440  				b := dAtA[iNdEx]
   441  				iNdEx++
   442  				m.Priority |= int64(b&0x7F) << shift
   443  				if b < 0x80 {
   444  					break
   445  				}
   446  			}
   447  		case 3:
   448  			if wireType != 2 {
   449  				return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType)
   450  			}
   451  			var msglen int
   452  			for shift := uint(0); ; shift += 7 {
   453  				if shift >= 64 {
   454  					return ErrIntOverflowTypes
   455  				}
   456  				if iNdEx >= l {
   457  					return io.ErrUnexpectedEOF
   458  				}
   459  				b := dAtA[iNdEx]
   460  				iNdEx++
   461  				msglen |= int(b&0x7F) << shift
   462  				if b < 0x80 {
   463  					break
   464  				}
   465  			}
   466  			if msglen < 0 {
   467  				return ErrInvalidLengthTypes
   468  			}
   469  			postIndex := iNdEx + msglen
   470  			if postIndex < 0 {
   471  				return ErrInvalidLengthTypes
   472  			}
   473  			if postIndex > l {
   474  				return io.ErrUnexpectedEOF
   475  			}
   476  			if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   477  				return err
   478  			}
   479  			iNdEx = postIndex
   480  		default:
   481  			iNdEx = preIndex
   482  			skippy, err := skipTypes(dAtA[iNdEx:])
   483  			if err != nil {
   484  				return err
   485  			}
   486  			if skippy < 0 {
   487  				return ErrInvalidLengthTypes
   488  			}
   489  			if (iNdEx + skippy) < 0 {
   490  				return ErrInvalidLengthTypes
   491  			}
   492  			if (iNdEx + skippy) > l {
   493  				return io.ErrUnexpectedEOF
   494  			}
   495  			iNdEx += skippy
   496  		}
   497  	}
   498  
   499  	if iNdEx > l {
   500  		return io.ErrUnexpectedEOF
   501  	}
   502  	return nil
   503  }
   504  func skipTypes(dAtA []byte) (n int, err error) {
   505  	l := len(dAtA)
   506  	iNdEx := 0
   507  	depth := 0
   508  	for iNdEx < l {
   509  		var wire uint64
   510  		for shift := uint(0); ; shift += 7 {
   511  			if shift >= 64 {
   512  				return 0, ErrIntOverflowTypes
   513  			}
   514  			if iNdEx >= l {
   515  				return 0, io.ErrUnexpectedEOF
   516  			}
   517  			b := dAtA[iNdEx]
   518  			iNdEx++
   519  			wire |= (uint64(b) & 0x7F) << shift
   520  			if b < 0x80 {
   521  				break
   522  			}
   523  		}
   524  		wireType := int(wire & 0x7)
   525  		switch wireType {
   526  		case 0:
   527  			for shift := uint(0); ; shift += 7 {
   528  				if shift >= 64 {
   529  					return 0, ErrIntOverflowTypes
   530  				}
   531  				if iNdEx >= l {
   532  					return 0, io.ErrUnexpectedEOF
   533  				}
   534  				iNdEx++
   535  				if dAtA[iNdEx-1] < 0x80 {
   536  					break
   537  				}
   538  			}
   539  		case 1:
   540  			iNdEx += 8
   541  		case 2:
   542  			var length int
   543  			for shift := uint(0); ; shift += 7 {
   544  				if shift >= 64 {
   545  					return 0, ErrIntOverflowTypes
   546  				}
   547  				if iNdEx >= l {
   548  					return 0, io.ErrUnexpectedEOF
   549  				}
   550  				b := dAtA[iNdEx]
   551  				iNdEx++
   552  				length |= (int(b) & 0x7F) << shift
   553  				if b < 0x80 {
   554  					break
   555  				}
   556  			}
   557  			if length < 0 {
   558  				return 0, ErrInvalidLengthTypes
   559  			}
   560  			iNdEx += length
   561  		case 3:
   562  			depth++
   563  		case 4:
   564  			if depth == 0 {
   565  				return 0, ErrUnexpectedEndOfGroupTypes
   566  			}
   567  			depth--
   568  		case 5:
   569  			iNdEx += 4
   570  		default:
   571  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   572  		}
   573  		if iNdEx < 0 {
   574  			return 0, ErrInvalidLengthTypes
   575  		}
   576  		if depth == 0 {
   577  			return iNdEx, nil
   578  		}
   579  	}
   580  	return 0, io.ErrUnexpectedEOF
   581  }
   582  
   583  var (
   584  	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
   585  	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
   586  	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
   587  )