github.com/adoriasoft/tendermint@v0.34.0-dev1.0.20200722151356-96d84601a75a/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  	// 225 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, 0x27, 0xa6,
   157  	0xe4, 0x17, 0x65, 0x26, 0x82, 0xec, 0xd3, 0x47, 0xf2, 0x33, 0xc4, 0x1b, 0x98, 0x81, 0x90, 0xc4,
   158  	0x06, 0x96, 0x31, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x83, 0x49, 0x6e, 0x21, 0x01, 0x00,
   159  	0x00,
   160  }
   161  
   162  func (this *Consensus) Equal(that interface{}) bool {
   163  	if that == nil {
   164  		return this == nil
   165  	}
   166  
   167  	that1, ok := that.(*Consensus)
   168  	if !ok {
   169  		that2, ok := that.(Consensus)
   170  		if ok {
   171  			that1 = &that2
   172  		} else {
   173  			return false
   174  		}
   175  	}
   176  	if that1 == nil {
   177  		return this == nil
   178  	} else if this == nil {
   179  		return false
   180  	}
   181  	if this.Block != that1.Block {
   182  		return false
   183  	}
   184  	if this.App != that1.App {
   185  		return false
   186  	}
   187  	return true
   188  }
   189  func (m *App) Marshal() (dAtA []byte, err error) {
   190  	size := m.Size()
   191  	dAtA = make([]byte, size)
   192  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   193  	if err != nil {
   194  		return nil, err
   195  	}
   196  	return dAtA[:n], nil
   197  }
   198  
   199  func (m *App) MarshalTo(dAtA []byte) (int, error) {
   200  	size := m.Size()
   201  	return m.MarshalToSizedBuffer(dAtA[:size])
   202  }
   203  
   204  func (m *App) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   205  	i := len(dAtA)
   206  	_ = i
   207  	var l int
   208  	_ = l
   209  	if len(m.Software) > 0 {
   210  		i -= len(m.Software)
   211  		copy(dAtA[i:], m.Software)
   212  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Software)))
   213  		i--
   214  		dAtA[i] = 0x12
   215  	}
   216  	if m.Protocol != 0 {
   217  		i = encodeVarintTypes(dAtA, i, uint64(m.Protocol))
   218  		i--
   219  		dAtA[i] = 0x8
   220  	}
   221  	return len(dAtA) - i, nil
   222  }
   223  
   224  func (m *Consensus) Marshal() (dAtA []byte, err error) {
   225  	size := m.Size()
   226  	dAtA = make([]byte, size)
   227  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   228  	if err != nil {
   229  		return nil, err
   230  	}
   231  	return dAtA[:n], nil
   232  }
   233  
   234  func (m *Consensus) MarshalTo(dAtA []byte) (int, error) {
   235  	size := m.Size()
   236  	return m.MarshalToSizedBuffer(dAtA[:size])
   237  }
   238  
   239  func (m *Consensus) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   240  	i := len(dAtA)
   241  	_ = i
   242  	var l int
   243  	_ = l
   244  	if m.App != 0 {
   245  		i = encodeVarintTypes(dAtA, i, uint64(m.App))
   246  		i--
   247  		dAtA[i] = 0x10
   248  	}
   249  	if m.Block != 0 {
   250  		i = encodeVarintTypes(dAtA, i, uint64(m.Block))
   251  		i--
   252  		dAtA[i] = 0x8
   253  	}
   254  	return len(dAtA) - i, nil
   255  }
   256  
   257  func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
   258  	offset -= sovTypes(v)
   259  	base := offset
   260  	for v >= 1<<7 {
   261  		dAtA[offset] = uint8(v&0x7f | 0x80)
   262  		v >>= 7
   263  		offset++
   264  	}
   265  	dAtA[offset] = uint8(v)
   266  	return base
   267  }
   268  func (m *App) Size() (n int) {
   269  	if m == nil {
   270  		return 0
   271  	}
   272  	var l int
   273  	_ = l
   274  	if m.Protocol != 0 {
   275  		n += 1 + sovTypes(uint64(m.Protocol))
   276  	}
   277  	l = len(m.Software)
   278  	if l > 0 {
   279  		n += 1 + l + sovTypes(uint64(l))
   280  	}
   281  	return n
   282  }
   283  
   284  func (m *Consensus) Size() (n int) {
   285  	if m == nil {
   286  		return 0
   287  	}
   288  	var l int
   289  	_ = l
   290  	if m.Block != 0 {
   291  		n += 1 + sovTypes(uint64(m.Block))
   292  	}
   293  	if m.App != 0 {
   294  		n += 1 + sovTypes(uint64(m.App))
   295  	}
   296  	return n
   297  }
   298  
   299  func sovTypes(x uint64) (n int) {
   300  	return (math_bits.Len64(x|1) + 6) / 7
   301  }
   302  func sozTypes(x uint64) (n int) {
   303  	return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   304  }
   305  func (m *App) Unmarshal(dAtA []byte) error {
   306  	l := len(dAtA)
   307  	iNdEx := 0
   308  	for iNdEx < l {
   309  		preIndex := iNdEx
   310  		var wire uint64
   311  		for shift := uint(0); ; shift += 7 {
   312  			if shift >= 64 {
   313  				return ErrIntOverflowTypes
   314  			}
   315  			if iNdEx >= l {
   316  				return io.ErrUnexpectedEOF
   317  			}
   318  			b := dAtA[iNdEx]
   319  			iNdEx++
   320  			wire |= uint64(b&0x7F) << shift
   321  			if b < 0x80 {
   322  				break
   323  			}
   324  		}
   325  		fieldNum := int32(wire >> 3)
   326  		wireType := int(wire & 0x7)
   327  		if wireType == 4 {
   328  			return fmt.Errorf("proto: App: wiretype end group for non-group")
   329  		}
   330  		if fieldNum <= 0 {
   331  			return fmt.Errorf("proto: App: illegal tag %d (wire type %d)", fieldNum, wire)
   332  		}
   333  		switch fieldNum {
   334  		case 1:
   335  			if wireType != 0 {
   336  				return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType)
   337  			}
   338  			m.Protocol = 0
   339  			for shift := uint(0); ; shift += 7 {
   340  				if shift >= 64 {
   341  					return ErrIntOverflowTypes
   342  				}
   343  				if iNdEx >= l {
   344  					return io.ErrUnexpectedEOF
   345  				}
   346  				b := dAtA[iNdEx]
   347  				iNdEx++
   348  				m.Protocol |= uint64(b&0x7F) << shift
   349  				if b < 0x80 {
   350  					break
   351  				}
   352  			}
   353  		case 2:
   354  			if wireType != 2 {
   355  				return fmt.Errorf("proto: wrong wireType = %d for field Software", wireType)
   356  			}
   357  			var stringLen uint64
   358  			for shift := uint(0); ; shift += 7 {
   359  				if shift >= 64 {
   360  					return ErrIntOverflowTypes
   361  				}
   362  				if iNdEx >= l {
   363  					return io.ErrUnexpectedEOF
   364  				}
   365  				b := dAtA[iNdEx]
   366  				iNdEx++
   367  				stringLen |= uint64(b&0x7F) << shift
   368  				if b < 0x80 {
   369  					break
   370  				}
   371  			}
   372  			intStringLen := int(stringLen)
   373  			if intStringLen < 0 {
   374  				return ErrInvalidLengthTypes
   375  			}
   376  			postIndex := iNdEx + intStringLen
   377  			if postIndex < 0 {
   378  				return ErrInvalidLengthTypes
   379  			}
   380  			if postIndex > l {
   381  				return io.ErrUnexpectedEOF
   382  			}
   383  			m.Software = string(dAtA[iNdEx:postIndex])
   384  			iNdEx = postIndex
   385  		default:
   386  			iNdEx = preIndex
   387  			skippy, err := skipTypes(dAtA[iNdEx:])
   388  			if err != nil {
   389  				return err
   390  			}
   391  			if skippy < 0 {
   392  				return ErrInvalidLengthTypes
   393  			}
   394  			if (iNdEx + skippy) < 0 {
   395  				return ErrInvalidLengthTypes
   396  			}
   397  			if (iNdEx + skippy) > l {
   398  				return io.ErrUnexpectedEOF
   399  			}
   400  			iNdEx += skippy
   401  		}
   402  	}
   403  
   404  	if iNdEx > l {
   405  		return io.ErrUnexpectedEOF
   406  	}
   407  	return nil
   408  }
   409  func (m *Consensus) Unmarshal(dAtA []byte) error {
   410  	l := len(dAtA)
   411  	iNdEx := 0
   412  	for iNdEx < l {
   413  		preIndex := iNdEx
   414  		var wire uint64
   415  		for shift := uint(0); ; shift += 7 {
   416  			if shift >= 64 {
   417  				return ErrIntOverflowTypes
   418  			}
   419  			if iNdEx >= l {
   420  				return io.ErrUnexpectedEOF
   421  			}
   422  			b := dAtA[iNdEx]
   423  			iNdEx++
   424  			wire |= uint64(b&0x7F) << shift
   425  			if b < 0x80 {
   426  				break
   427  			}
   428  		}
   429  		fieldNum := int32(wire >> 3)
   430  		wireType := int(wire & 0x7)
   431  		if wireType == 4 {
   432  			return fmt.Errorf("proto: Consensus: wiretype end group for non-group")
   433  		}
   434  		if fieldNum <= 0 {
   435  			return fmt.Errorf("proto: Consensus: illegal tag %d (wire type %d)", fieldNum, wire)
   436  		}
   437  		switch fieldNum {
   438  		case 1:
   439  			if wireType != 0 {
   440  				return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType)
   441  			}
   442  			m.Block = 0
   443  			for shift := uint(0); ; shift += 7 {
   444  				if shift >= 64 {
   445  					return ErrIntOverflowTypes
   446  				}
   447  				if iNdEx >= l {
   448  					return io.ErrUnexpectedEOF
   449  				}
   450  				b := dAtA[iNdEx]
   451  				iNdEx++
   452  				m.Block |= uint64(b&0x7F) << shift
   453  				if b < 0x80 {
   454  					break
   455  				}
   456  			}
   457  		case 2:
   458  			if wireType != 0 {
   459  				return fmt.Errorf("proto: wrong wireType = %d for field App", wireType)
   460  			}
   461  			m.App = 0
   462  			for shift := uint(0); ; shift += 7 {
   463  				if shift >= 64 {
   464  					return ErrIntOverflowTypes
   465  				}
   466  				if iNdEx >= l {
   467  					return io.ErrUnexpectedEOF
   468  				}
   469  				b := dAtA[iNdEx]
   470  				iNdEx++
   471  				m.App |= uint64(b&0x7F) << shift
   472  				if b < 0x80 {
   473  					break
   474  				}
   475  			}
   476  		default:
   477  			iNdEx = preIndex
   478  			skippy, err := skipTypes(dAtA[iNdEx:])
   479  			if err != nil {
   480  				return err
   481  			}
   482  			if skippy < 0 {
   483  				return ErrInvalidLengthTypes
   484  			}
   485  			if (iNdEx + skippy) < 0 {
   486  				return ErrInvalidLengthTypes
   487  			}
   488  			if (iNdEx + skippy) > l {
   489  				return io.ErrUnexpectedEOF
   490  			}
   491  			iNdEx += skippy
   492  		}
   493  	}
   494  
   495  	if iNdEx > l {
   496  		return io.ErrUnexpectedEOF
   497  	}
   498  	return nil
   499  }
   500  func skipTypes(dAtA []byte) (n int, err error) {
   501  	l := len(dAtA)
   502  	iNdEx := 0
   503  	depth := 0
   504  	for iNdEx < l {
   505  		var wire uint64
   506  		for shift := uint(0); ; shift += 7 {
   507  			if shift >= 64 {
   508  				return 0, ErrIntOverflowTypes
   509  			}
   510  			if iNdEx >= l {
   511  				return 0, io.ErrUnexpectedEOF
   512  			}
   513  			b := dAtA[iNdEx]
   514  			iNdEx++
   515  			wire |= (uint64(b) & 0x7F) << shift
   516  			if b < 0x80 {
   517  				break
   518  			}
   519  		}
   520  		wireType := int(wire & 0x7)
   521  		switch wireType {
   522  		case 0:
   523  			for shift := uint(0); ; shift += 7 {
   524  				if shift >= 64 {
   525  					return 0, ErrIntOverflowTypes
   526  				}
   527  				if iNdEx >= l {
   528  					return 0, io.ErrUnexpectedEOF
   529  				}
   530  				iNdEx++
   531  				if dAtA[iNdEx-1] < 0x80 {
   532  					break
   533  				}
   534  			}
   535  		case 1:
   536  			iNdEx += 8
   537  		case 2:
   538  			var length int
   539  			for shift := uint(0); ; shift += 7 {
   540  				if shift >= 64 {
   541  					return 0, ErrIntOverflowTypes
   542  				}
   543  				if iNdEx >= l {
   544  					return 0, io.ErrUnexpectedEOF
   545  				}
   546  				b := dAtA[iNdEx]
   547  				iNdEx++
   548  				length |= (int(b) & 0x7F) << shift
   549  				if b < 0x80 {
   550  					break
   551  				}
   552  			}
   553  			if length < 0 {
   554  				return 0, ErrInvalidLengthTypes
   555  			}
   556  			iNdEx += length
   557  		case 3:
   558  			depth++
   559  		case 4:
   560  			if depth == 0 {
   561  				return 0, ErrUnexpectedEndOfGroupTypes
   562  			}
   563  			depth--
   564  		case 5:
   565  			iNdEx += 4
   566  		default:
   567  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   568  		}
   569  		if iNdEx < 0 {
   570  			return 0, ErrInvalidLengthTypes
   571  		}
   572  		if depth == 0 {
   573  			return iNdEx, nil
   574  		}
   575  	}
   576  	return 0, io.ErrUnexpectedEOF
   577  }
   578  
   579  var (
   580  	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
   581  	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
   582  	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
   583  )