github.com/Finschia/finschia-sdk@v0.48.1/x/evidence/types/evidence.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: cosmos/evidence/v1beta1/evidence.proto
     3  
     4  package types
     5  
     6  import (
     7  	fmt "fmt"
     8  	_ "github.com/gogo/protobuf/gogoproto"
     9  	proto "github.com/gogo/protobuf/proto"
    10  	github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
    11  	_ "google.golang.org/protobuf/types/known/timestamppb"
    12  	io "io"
    13  	math "math"
    14  	math_bits "math/bits"
    15  	time "time"
    16  )
    17  
    18  // Reference imports to suppress errors if they are not otherwise used.
    19  var _ = proto.Marshal
    20  var _ = fmt.Errorf
    21  var _ = math.Inf
    22  var _ = time.Kitchen
    23  
    24  // This is a compile-time assertion to ensure that this generated file
    25  // is compatible with the proto package it is being compiled against.
    26  // A compilation error at this line likely means your copy of the
    27  // proto package needs to be updated.
    28  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    29  
    30  // Equivocation implements the Evidence interface and defines evidence of double
    31  // signing misbehavior.
    32  type Equivocation struct {
    33  	Height           int64     `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
    34  	Time             time.Time `protobuf:"bytes,2,opt,name=time,proto3,stdtime" json:"time"`
    35  	Power            int64     `protobuf:"varint,3,opt,name=power,proto3" json:"power,omitempty"`
    36  	ConsensusAddress string    `protobuf:"bytes,4,opt,name=consensus_address,json=consensusAddress,proto3" json:"consensus_address,omitempty" yaml:"consensus_address"`
    37  }
    38  
    39  func (m *Equivocation) Reset()      { *m = Equivocation{} }
    40  func (*Equivocation) ProtoMessage() {}
    41  func (*Equivocation) Descriptor() ([]byte, []int) {
    42  	return fileDescriptor_dd143e71a177f0dd, []int{0}
    43  }
    44  func (m *Equivocation) XXX_Unmarshal(b []byte) error {
    45  	return m.Unmarshal(b)
    46  }
    47  func (m *Equivocation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    48  	if deterministic {
    49  		return xxx_messageInfo_Equivocation.Marshal(b, m, deterministic)
    50  	} else {
    51  		b = b[:cap(b)]
    52  		n, err := m.MarshalToSizedBuffer(b)
    53  		if err != nil {
    54  			return nil, err
    55  		}
    56  		return b[:n], nil
    57  	}
    58  }
    59  func (m *Equivocation) XXX_Merge(src proto.Message) {
    60  	xxx_messageInfo_Equivocation.Merge(m, src)
    61  }
    62  func (m *Equivocation) XXX_Size() int {
    63  	return m.Size()
    64  }
    65  func (m *Equivocation) XXX_DiscardUnknown() {
    66  	xxx_messageInfo_Equivocation.DiscardUnknown(m)
    67  }
    68  
    69  var xxx_messageInfo_Equivocation proto.InternalMessageInfo
    70  
    71  func init() {
    72  	proto.RegisterType((*Equivocation)(nil), "cosmos.evidence.v1beta1.Equivocation")
    73  }
    74  
    75  func init() {
    76  	proto.RegisterFile("cosmos/evidence/v1beta1/evidence.proto", fileDescriptor_dd143e71a177f0dd)
    77  }
    78  
    79  var fileDescriptor_dd143e71a177f0dd = []byte{
    80  	// 331 bytes of a gzipped FileDescriptorProto
    81  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0x3f, 0x4f, 0xfa, 0x40,
    82  	0x1c, 0xc6, 0xef, 0x7e, 0xf0, 0x23, 0x5a, 0x19, 0xb4, 0x21, 0xda, 0x10, 0x73, 0x47, 0x18, 0x0c,
    83  	0x8b, 0xbd, 0xa0, 0x8b, 0x61, 0x93, 0x44, 0x13, 0x27, 0x13, 0xe2, 0xe4, 0x62, 0xfa, 0xe7, 0x68,
    84  	0x2f, 0xd2, 0x7e, 0x2b, 0x77, 0x45, 0x79, 0x07, 0x8e, 0x8c, 0x8e, 0x8c, 0xbe, 0x14, 0x36, 0x19,
    85  	0x9d, 0xd0, 0x94, 0xc5, 0xd9, 0x57, 0x60, 0xe8, 0x41, 0x1d, 0xdc, 0xbe, 0xcf, 0x93, 0xcf, 0xf3,
    86  	0x49, 0x2e, 0x67, 0x1c, 0x79, 0x20, 0x23, 0x90, 0x8c, 0x8f, 0x84, 0xcf, 0x63, 0x8f, 0xb3, 0x51,
    87  	0xdb, 0xe5, 0xca, 0x69, 0x17, 0x85, 0x9d, 0x0c, 0x41, 0x81, 0x79, 0xa0, 0x39, 0xbb, 0xa8, 0xd7,
    88  	0x5c, 0xbd, 0x16, 0x40, 0x00, 0x39, 0xc3, 0x56, 0x97, 0xc6, 0xeb, 0x34, 0x00, 0x08, 0x06, 0x9c,
    89  	0xe5, 0xc9, 0x4d, 0xfb, 0x4c, 0x89, 0x88, 0x4b, 0xe5, 0x44, 0x89, 0x06, 0x9a, 0x6f, 0xd8, 0xa8,
    90  	0x5e, 0x3c, 0xa4, 0x62, 0x04, 0x9e, 0xa3, 0x04, 0xc4, 0xe6, 0xbe, 0x51, 0x09, 0xb9, 0x08, 0x42,
    91  	0x65, 0xe1, 0x06, 0x6e, 0x95, 0x7a, 0xeb, 0x64, 0x9e, 0x19, 0xe5, 0xd5, 0xd6, 0xfa, 0xd7, 0xc0,
    92  	0xad, 0x9d, 0x93, 0xba, 0xad, 0xc5, 0xf6, 0x46, 0x6c, 0xdf, 0x6c, 0xc4, 0xdd, 0xad, 0xd9, 0x82,
    93  	0xa2, 0xc9, 0x07, 0xc5, 0xbd, 0x7c, 0x61, 0xd6, 0x8c, 0xff, 0x09, 0x3c, 0xf2, 0xa1, 0x55, 0xca,
    94  	0x85, 0x3a, 0x98, 0x57, 0xc6, 0x9e, 0x07, 0xb1, 0xe4, 0xb1, 0x4c, 0xe5, 0x9d, 0xe3, 0xfb, 0x43,
    95  	0x2e, 0xa5, 0x55, 0x6e, 0xe0, 0xd6, 0x76, 0xf7, 0xf0, 0x7b, 0x41, 0xad, 0xb1, 0x13, 0x0d, 0x3a,
    96  	0xcd, 0x3f, 0x48, 0xb3, 0xb7, 0x5b, 0x74, 0xe7, 0xba, 0xea, 0x54, 0x9f, 0xa7, 0x14, 0xbd, 0x4c,
    97  	0x29, 0xfa, 0x9a, 0x52, 0xd4, 0xbd, 0x7e, 0xcd, 0x08, 0x9e, 0x65, 0x04, 0xcf, 0x33, 0x82, 0x3f,
    98  	0x33, 0x82, 0x27, 0x4b, 0x82, 0xe6, 0x4b, 0x82, 0xde, 0x97, 0x04, 0xdd, 0xb6, 0x03, 0xa1, 0xc2,
    99  	0xd4, 0xb5, 0x3d, 0x88, 0xd8, 0xa5, 0x88, 0xa5, 0x17, 0x0a, 0x87, 0xf5, 0xd7, 0xc7, 0xb1, 0xf4,
   100  	0xef, 0xd9, 0xd3, 0xef, 0x1f, 0xa8, 0x71, 0xc2, 0xa5, 0x5b, 0xc9, 0xdf, 0x78, 0xfa, 0x13, 0x00,
   101  	0x00, 0xff, 0xff, 0x54, 0xd6, 0x7c, 0xfe, 0xa3, 0x01, 0x00, 0x00,
   102  }
   103  
   104  func (m *Equivocation) Marshal() (dAtA []byte, err error) {
   105  	size := m.Size()
   106  	dAtA = make([]byte, size)
   107  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   108  	if err != nil {
   109  		return nil, err
   110  	}
   111  	return dAtA[:n], nil
   112  }
   113  
   114  func (m *Equivocation) MarshalTo(dAtA []byte) (int, error) {
   115  	size := m.Size()
   116  	return m.MarshalToSizedBuffer(dAtA[:size])
   117  }
   118  
   119  func (m *Equivocation) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   120  	i := len(dAtA)
   121  	_ = i
   122  	var l int
   123  	_ = l
   124  	if len(m.ConsensusAddress) > 0 {
   125  		i -= len(m.ConsensusAddress)
   126  		copy(dAtA[i:], m.ConsensusAddress)
   127  		i = encodeVarintEvidence(dAtA, i, uint64(len(m.ConsensusAddress)))
   128  		i--
   129  		dAtA[i] = 0x22
   130  	}
   131  	if m.Power != 0 {
   132  		i = encodeVarintEvidence(dAtA, i, uint64(m.Power))
   133  		i--
   134  		dAtA[i] = 0x18
   135  	}
   136  	n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):])
   137  	if err1 != nil {
   138  		return 0, err1
   139  	}
   140  	i -= n1
   141  	i = encodeVarintEvidence(dAtA, i, uint64(n1))
   142  	i--
   143  	dAtA[i] = 0x12
   144  	if m.Height != 0 {
   145  		i = encodeVarintEvidence(dAtA, i, uint64(m.Height))
   146  		i--
   147  		dAtA[i] = 0x8
   148  	}
   149  	return len(dAtA) - i, nil
   150  }
   151  
   152  func encodeVarintEvidence(dAtA []byte, offset int, v uint64) int {
   153  	offset -= sovEvidence(v)
   154  	base := offset
   155  	for v >= 1<<7 {
   156  		dAtA[offset] = uint8(v&0x7f | 0x80)
   157  		v >>= 7
   158  		offset++
   159  	}
   160  	dAtA[offset] = uint8(v)
   161  	return base
   162  }
   163  func (m *Equivocation) Size() (n int) {
   164  	if m == nil {
   165  		return 0
   166  	}
   167  	var l int
   168  	_ = l
   169  	if m.Height != 0 {
   170  		n += 1 + sovEvidence(uint64(m.Height))
   171  	}
   172  	l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time)
   173  	n += 1 + l + sovEvidence(uint64(l))
   174  	if m.Power != 0 {
   175  		n += 1 + sovEvidence(uint64(m.Power))
   176  	}
   177  	l = len(m.ConsensusAddress)
   178  	if l > 0 {
   179  		n += 1 + l + sovEvidence(uint64(l))
   180  	}
   181  	return n
   182  }
   183  
   184  func sovEvidence(x uint64) (n int) {
   185  	return (math_bits.Len64(x|1) + 6) / 7
   186  }
   187  func sozEvidence(x uint64) (n int) {
   188  	return sovEvidence(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   189  }
   190  func (m *Equivocation) Unmarshal(dAtA []byte) error {
   191  	l := len(dAtA)
   192  	iNdEx := 0
   193  	for iNdEx < l {
   194  		preIndex := iNdEx
   195  		var wire uint64
   196  		for shift := uint(0); ; shift += 7 {
   197  			if shift >= 64 {
   198  				return ErrIntOverflowEvidence
   199  			}
   200  			if iNdEx >= l {
   201  				return io.ErrUnexpectedEOF
   202  			}
   203  			b := dAtA[iNdEx]
   204  			iNdEx++
   205  			wire |= uint64(b&0x7F) << shift
   206  			if b < 0x80 {
   207  				break
   208  			}
   209  		}
   210  		fieldNum := int32(wire >> 3)
   211  		wireType := int(wire & 0x7)
   212  		if wireType == 4 {
   213  			return fmt.Errorf("proto: Equivocation: wiretype end group for non-group")
   214  		}
   215  		if fieldNum <= 0 {
   216  			return fmt.Errorf("proto: Equivocation: illegal tag %d (wire type %d)", fieldNum, wire)
   217  		}
   218  		switch fieldNum {
   219  		case 1:
   220  			if wireType != 0 {
   221  				return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
   222  			}
   223  			m.Height = 0
   224  			for shift := uint(0); ; shift += 7 {
   225  				if shift >= 64 {
   226  					return ErrIntOverflowEvidence
   227  				}
   228  				if iNdEx >= l {
   229  					return io.ErrUnexpectedEOF
   230  				}
   231  				b := dAtA[iNdEx]
   232  				iNdEx++
   233  				m.Height |= int64(b&0x7F) << shift
   234  				if b < 0x80 {
   235  					break
   236  				}
   237  			}
   238  		case 2:
   239  			if wireType != 2 {
   240  				return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
   241  			}
   242  			var msglen int
   243  			for shift := uint(0); ; shift += 7 {
   244  				if shift >= 64 {
   245  					return ErrIntOverflowEvidence
   246  				}
   247  				if iNdEx >= l {
   248  					return io.ErrUnexpectedEOF
   249  				}
   250  				b := dAtA[iNdEx]
   251  				iNdEx++
   252  				msglen |= int(b&0x7F) << shift
   253  				if b < 0x80 {
   254  					break
   255  				}
   256  			}
   257  			if msglen < 0 {
   258  				return ErrInvalidLengthEvidence
   259  			}
   260  			postIndex := iNdEx + msglen
   261  			if postIndex < 0 {
   262  				return ErrInvalidLengthEvidence
   263  			}
   264  			if postIndex > l {
   265  				return io.ErrUnexpectedEOF
   266  			}
   267  			if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil {
   268  				return err
   269  			}
   270  			iNdEx = postIndex
   271  		case 3:
   272  			if wireType != 0 {
   273  				return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType)
   274  			}
   275  			m.Power = 0
   276  			for shift := uint(0); ; shift += 7 {
   277  				if shift >= 64 {
   278  					return ErrIntOverflowEvidence
   279  				}
   280  				if iNdEx >= l {
   281  					return io.ErrUnexpectedEOF
   282  				}
   283  				b := dAtA[iNdEx]
   284  				iNdEx++
   285  				m.Power |= int64(b&0x7F) << shift
   286  				if b < 0x80 {
   287  					break
   288  				}
   289  			}
   290  		case 4:
   291  			if wireType != 2 {
   292  				return fmt.Errorf("proto: wrong wireType = %d for field ConsensusAddress", wireType)
   293  			}
   294  			var stringLen uint64
   295  			for shift := uint(0); ; shift += 7 {
   296  				if shift >= 64 {
   297  					return ErrIntOverflowEvidence
   298  				}
   299  				if iNdEx >= l {
   300  					return io.ErrUnexpectedEOF
   301  				}
   302  				b := dAtA[iNdEx]
   303  				iNdEx++
   304  				stringLen |= uint64(b&0x7F) << shift
   305  				if b < 0x80 {
   306  					break
   307  				}
   308  			}
   309  			intStringLen := int(stringLen)
   310  			if intStringLen < 0 {
   311  				return ErrInvalidLengthEvidence
   312  			}
   313  			postIndex := iNdEx + intStringLen
   314  			if postIndex < 0 {
   315  				return ErrInvalidLengthEvidence
   316  			}
   317  			if postIndex > l {
   318  				return io.ErrUnexpectedEOF
   319  			}
   320  			m.ConsensusAddress = string(dAtA[iNdEx:postIndex])
   321  			iNdEx = postIndex
   322  		default:
   323  			iNdEx = preIndex
   324  			skippy, err := skipEvidence(dAtA[iNdEx:])
   325  			if err != nil {
   326  				return err
   327  			}
   328  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   329  				return ErrInvalidLengthEvidence
   330  			}
   331  			if (iNdEx + skippy) > l {
   332  				return io.ErrUnexpectedEOF
   333  			}
   334  			iNdEx += skippy
   335  		}
   336  	}
   337  
   338  	if iNdEx > l {
   339  		return io.ErrUnexpectedEOF
   340  	}
   341  	return nil
   342  }
   343  func skipEvidence(dAtA []byte) (n int, err error) {
   344  	l := len(dAtA)
   345  	iNdEx := 0
   346  	depth := 0
   347  	for iNdEx < l {
   348  		var wire uint64
   349  		for shift := uint(0); ; shift += 7 {
   350  			if shift >= 64 {
   351  				return 0, ErrIntOverflowEvidence
   352  			}
   353  			if iNdEx >= l {
   354  				return 0, io.ErrUnexpectedEOF
   355  			}
   356  			b := dAtA[iNdEx]
   357  			iNdEx++
   358  			wire |= (uint64(b) & 0x7F) << shift
   359  			if b < 0x80 {
   360  				break
   361  			}
   362  		}
   363  		wireType := int(wire & 0x7)
   364  		switch wireType {
   365  		case 0:
   366  			for shift := uint(0); ; shift += 7 {
   367  				if shift >= 64 {
   368  					return 0, ErrIntOverflowEvidence
   369  				}
   370  				if iNdEx >= l {
   371  					return 0, io.ErrUnexpectedEOF
   372  				}
   373  				iNdEx++
   374  				if dAtA[iNdEx-1] < 0x80 {
   375  					break
   376  				}
   377  			}
   378  		case 1:
   379  			iNdEx += 8
   380  		case 2:
   381  			var length int
   382  			for shift := uint(0); ; shift += 7 {
   383  				if shift >= 64 {
   384  					return 0, ErrIntOverflowEvidence
   385  				}
   386  				if iNdEx >= l {
   387  					return 0, io.ErrUnexpectedEOF
   388  				}
   389  				b := dAtA[iNdEx]
   390  				iNdEx++
   391  				length |= (int(b) & 0x7F) << shift
   392  				if b < 0x80 {
   393  					break
   394  				}
   395  			}
   396  			if length < 0 {
   397  				return 0, ErrInvalidLengthEvidence
   398  			}
   399  			iNdEx += length
   400  		case 3:
   401  			depth++
   402  		case 4:
   403  			if depth == 0 {
   404  				return 0, ErrUnexpectedEndOfGroupEvidence
   405  			}
   406  			depth--
   407  		case 5:
   408  			iNdEx += 4
   409  		default:
   410  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   411  		}
   412  		if iNdEx < 0 {
   413  			return 0, ErrInvalidLengthEvidence
   414  		}
   415  		if depth == 0 {
   416  			return iNdEx, nil
   417  		}
   418  	}
   419  	return 0, io.ErrUnexpectedEOF
   420  }
   421  
   422  var (
   423  	ErrInvalidLengthEvidence        = fmt.Errorf("proto: negative length found during unmarshaling")
   424  	ErrIntOverflowEvidence          = fmt.Errorf("proto: integer overflow")
   425  	ErrUnexpectedEndOfGroupEvidence = fmt.Errorf("proto: unexpected end of group")
   426  )