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