github.com/number571/tendermint@v0.34.11-gost/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  // Consensus captures the consensus rules for processing a block in the blockchain,
    27  // including all blockchain data structures and the rules of the application's
    28  // state transition machine.
    29  type Consensus struct {
    30  	Block uint64 `protobuf:"varint,1,opt,name=block,proto3" json:"block,omitempty"`
    31  	App   uint64 `protobuf:"varint,2,opt,name=app,proto3" json:"app,omitempty"`
    32  }
    33  
    34  func (m *Consensus) Reset()         { *m = Consensus{} }
    35  func (m *Consensus) String() string { return proto.CompactTextString(m) }
    36  func (*Consensus) ProtoMessage()    {}
    37  func (*Consensus) Descriptor() ([]byte, []int) {
    38  	return fileDescriptor_f9b42966edc5edad, []int{0}
    39  }
    40  func (m *Consensus) XXX_Unmarshal(b []byte) error {
    41  	return m.Unmarshal(b)
    42  }
    43  func (m *Consensus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    44  	if deterministic {
    45  		return xxx_messageInfo_Consensus.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 *Consensus) XXX_Merge(src proto.Message) {
    56  	xxx_messageInfo_Consensus.Merge(m, src)
    57  }
    58  func (m *Consensus) XXX_Size() int {
    59  	return m.Size()
    60  }
    61  func (m *Consensus) XXX_DiscardUnknown() {
    62  	xxx_messageInfo_Consensus.DiscardUnknown(m)
    63  }
    64  
    65  var xxx_messageInfo_Consensus proto.InternalMessageInfo
    66  
    67  func (m *Consensus) GetBlock() uint64 {
    68  	if m != nil {
    69  		return m.Block
    70  	}
    71  	return 0
    72  }
    73  
    74  func (m *Consensus) GetApp() uint64 {
    75  	if m != nil {
    76  		return m.App
    77  	}
    78  	return 0
    79  }
    80  
    81  func init() {
    82  	proto.RegisterType((*Consensus)(nil), "tendermint.version.Consensus")
    83  }
    84  
    85  func init() { proto.RegisterFile("tendermint/version/types.proto", fileDescriptor_f9b42966edc5edad) }
    86  
    87  var fileDescriptor_f9b42966edc5edad = []byte{
    88  	// 179 bytes of a gzipped FileDescriptorProto
    89  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2b, 0x49, 0xcd, 0x4b,
    90  	0x49, 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x2f, 0x4b, 0x2d, 0x2a, 0xce, 0xcc, 0xcf, 0xd3, 0x2f,
    91  	0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x42, 0xc8, 0xeb, 0x41,
    92  	0xe5, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0xd2, 0xfa, 0x20, 0x16, 0x44, 0xa5, 0x92, 0x25,
    93  	0x17, 0xa7, 0x73, 0x7e, 0x5e, 0x71, 0x6a, 0x5e, 0x71, 0x69, 0xb1, 0x90, 0x08, 0x17, 0x6b, 0x52,
    94  	0x4e, 0x7e, 0x72, 0xb6, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x4b, 0x10, 0x84, 0x23, 0x24, 0xc0, 0xc5,
    95  	0x9c, 0x58, 0x50, 0x20, 0xc1, 0x04, 0x16, 0x03, 0x31, 0xad, 0x58, 0x5e, 0x2c, 0x90, 0x67, 0x74,
    96  	0x0a, 0x3e, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c,
    97  	0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xcb, 0xf4, 0xcc, 0x92,
    98  	0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0x24, 0x97, 0x22, 0x31, 0x21, 0xee, 0xc0, 0xf4,
    99  	0x45, 0x12, 0x1b, 0x58, 0xc6, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xf8, 0xf0, 0x65, 0xd2, 0xe2,
   100  	0x00, 0x00, 0x00,
   101  }
   102  
   103  func (this *Consensus) Equal(that interface{}) bool {
   104  	if that == nil {
   105  		return this == nil
   106  	}
   107  
   108  	that1, ok := that.(*Consensus)
   109  	if !ok {
   110  		that2, ok := that.(Consensus)
   111  		if ok {
   112  			that1 = &that2
   113  		} else {
   114  			return false
   115  		}
   116  	}
   117  	if that1 == nil {
   118  		return this == nil
   119  	} else if this == nil {
   120  		return false
   121  	}
   122  	if this.Block != that1.Block {
   123  		return false
   124  	}
   125  	if this.App != that1.App {
   126  		return false
   127  	}
   128  	return true
   129  }
   130  func (m *Consensus) Marshal() (dAtA []byte, err error) {
   131  	size := m.Size()
   132  	dAtA = make([]byte, size)
   133  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   134  	if err != nil {
   135  		return nil, err
   136  	}
   137  	return dAtA[:n], nil
   138  }
   139  
   140  func (m *Consensus) MarshalTo(dAtA []byte) (int, error) {
   141  	size := m.Size()
   142  	return m.MarshalToSizedBuffer(dAtA[:size])
   143  }
   144  
   145  func (m *Consensus) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   146  	i := len(dAtA)
   147  	_ = i
   148  	var l int
   149  	_ = l
   150  	if m.App != 0 {
   151  		i = encodeVarintTypes(dAtA, i, uint64(m.App))
   152  		i--
   153  		dAtA[i] = 0x10
   154  	}
   155  	if m.Block != 0 {
   156  		i = encodeVarintTypes(dAtA, i, uint64(m.Block))
   157  		i--
   158  		dAtA[i] = 0x8
   159  	}
   160  	return len(dAtA) - i, nil
   161  }
   162  
   163  func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
   164  	offset -= sovTypes(v)
   165  	base := offset
   166  	for v >= 1<<7 {
   167  		dAtA[offset] = uint8(v&0x7f | 0x80)
   168  		v >>= 7
   169  		offset++
   170  	}
   171  	dAtA[offset] = uint8(v)
   172  	return base
   173  }
   174  func (m *Consensus) Size() (n int) {
   175  	if m == nil {
   176  		return 0
   177  	}
   178  	var l int
   179  	_ = l
   180  	if m.Block != 0 {
   181  		n += 1 + sovTypes(uint64(m.Block))
   182  	}
   183  	if m.App != 0 {
   184  		n += 1 + sovTypes(uint64(m.App))
   185  	}
   186  	return n
   187  }
   188  
   189  func sovTypes(x uint64) (n int) {
   190  	return (math_bits.Len64(x|1) + 6) / 7
   191  }
   192  func sozTypes(x uint64) (n int) {
   193  	return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   194  }
   195  func (m *Consensus) Unmarshal(dAtA []byte) error {
   196  	l := len(dAtA)
   197  	iNdEx := 0
   198  	for iNdEx < l {
   199  		preIndex := iNdEx
   200  		var wire uint64
   201  		for shift := uint(0); ; shift += 7 {
   202  			if shift >= 64 {
   203  				return ErrIntOverflowTypes
   204  			}
   205  			if iNdEx >= l {
   206  				return io.ErrUnexpectedEOF
   207  			}
   208  			b := dAtA[iNdEx]
   209  			iNdEx++
   210  			wire |= uint64(b&0x7F) << shift
   211  			if b < 0x80 {
   212  				break
   213  			}
   214  		}
   215  		fieldNum := int32(wire >> 3)
   216  		wireType := int(wire & 0x7)
   217  		if wireType == 4 {
   218  			return fmt.Errorf("proto: Consensus: wiretype end group for non-group")
   219  		}
   220  		if fieldNum <= 0 {
   221  			return fmt.Errorf("proto: Consensus: illegal tag %d (wire type %d)", fieldNum, wire)
   222  		}
   223  		switch fieldNum {
   224  		case 1:
   225  			if wireType != 0 {
   226  				return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType)
   227  			}
   228  			m.Block = 0
   229  			for shift := uint(0); ; shift += 7 {
   230  				if shift >= 64 {
   231  					return ErrIntOverflowTypes
   232  				}
   233  				if iNdEx >= l {
   234  					return io.ErrUnexpectedEOF
   235  				}
   236  				b := dAtA[iNdEx]
   237  				iNdEx++
   238  				m.Block |= uint64(b&0x7F) << shift
   239  				if b < 0x80 {
   240  					break
   241  				}
   242  			}
   243  		case 2:
   244  			if wireType != 0 {
   245  				return fmt.Errorf("proto: wrong wireType = %d for field App", wireType)
   246  			}
   247  			m.App = 0
   248  			for shift := uint(0); ; shift += 7 {
   249  				if shift >= 64 {
   250  					return ErrIntOverflowTypes
   251  				}
   252  				if iNdEx >= l {
   253  					return io.ErrUnexpectedEOF
   254  				}
   255  				b := dAtA[iNdEx]
   256  				iNdEx++
   257  				m.App |= uint64(b&0x7F) << shift
   258  				if b < 0x80 {
   259  					break
   260  				}
   261  			}
   262  		default:
   263  			iNdEx = preIndex
   264  			skippy, err := skipTypes(dAtA[iNdEx:])
   265  			if err != nil {
   266  				return err
   267  			}
   268  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   269  				return ErrInvalidLengthTypes
   270  			}
   271  			if (iNdEx + skippy) > l {
   272  				return io.ErrUnexpectedEOF
   273  			}
   274  			iNdEx += skippy
   275  		}
   276  	}
   277  
   278  	if iNdEx > l {
   279  		return io.ErrUnexpectedEOF
   280  	}
   281  	return nil
   282  }
   283  func skipTypes(dAtA []byte) (n int, err error) {
   284  	l := len(dAtA)
   285  	iNdEx := 0
   286  	depth := 0
   287  	for iNdEx < l {
   288  		var wire uint64
   289  		for shift := uint(0); ; shift += 7 {
   290  			if shift >= 64 {
   291  				return 0, ErrIntOverflowTypes
   292  			}
   293  			if iNdEx >= l {
   294  				return 0, io.ErrUnexpectedEOF
   295  			}
   296  			b := dAtA[iNdEx]
   297  			iNdEx++
   298  			wire |= (uint64(b) & 0x7F) << shift
   299  			if b < 0x80 {
   300  				break
   301  			}
   302  		}
   303  		wireType := int(wire & 0x7)
   304  		switch wireType {
   305  		case 0:
   306  			for shift := uint(0); ; shift += 7 {
   307  				if shift >= 64 {
   308  					return 0, ErrIntOverflowTypes
   309  				}
   310  				if iNdEx >= l {
   311  					return 0, io.ErrUnexpectedEOF
   312  				}
   313  				iNdEx++
   314  				if dAtA[iNdEx-1] < 0x80 {
   315  					break
   316  				}
   317  			}
   318  		case 1:
   319  			iNdEx += 8
   320  		case 2:
   321  			var length int
   322  			for shift := uint(0); ; shift += 7 {
   323  				if shift >= 64 {
   324  					return 0, ErrIntOverflowTypes
   325  				}
   326  				if iNdEx >= l {
   327  					return 0, io.ErrUnexpectedEOF
   328  				}
   329  				b := dAtA[iNdEx]
   330  				iNdEx++
   331  				length |= (int(b) & 0x7F) << shift
   332  				if b < 0x80 {
   333  					break
   334  				}
   335  			}
   336  			if length < 0 {
   337  				return 0, ErrInvalidLengthTypes
   338  			}
   339  			iNdEx += length
   340  		case 3:
   341  			depth++
   342  		case 4:
   343  			if depth == 0 {
   344  				return 0, ErrUnexpectedEndOfGroupTypes
   345  			}
   346  			depth--
   347  		case 5:
   348  			iNdEx += 4
   349  		default:
   350  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   351  		}
   352  		if iNdEx < 0 {
   353  			return 0, ErrInvalidLengthTypes
   354  		}
   355  		if depth == 0 {
   356  			return iNdEx, nil
   357  		}
   358  	}
   359  	return 0, io.ErrUnexpectedEOF
   360  }
   361  
   362  var (
   363  	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
   364  	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
   365  	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
   366  )