github.com/vipernet-xyz/tm@v0.34.24/proto/tendermint/version/types.pb.go (about)

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