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