github.com/line/ostracon@v1.0.10-0.20230328032236-7f20145f065d/proto/ostracon/blockchain/types.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: ostracon/blockchain/types.proto 3 4 package blockchain 5 6 import ( 7 fmt "fmt" 8 proto "github.com/gogo/protobuf/proto" 9 types "github.com/line/ostracon/proto/ostracon/types" 10 blockchain "github.com/tendermint/tendermint/proto/tendermint/blockchain" 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package 26 27 // BlockResponse returns block to the requested 28 type BlockResponse struct { 29 Block *types.Block `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` 30 } 31 32 func (m *BlockResponse) Reset() { *m = BlockResponse{} } 33 func (m *BlockResponse) String() string { return proto.CompactTextString(m) } 34 func (*BlockResponse) ProtoMessage() {} 35 func (*BlockResponse) Descriptor() ([]byte, []int) { 36 return fileDescriptor_8fcd44ecf244cfa3, []int{0} 37 } 38 func (m *BlockResponse) XXX_Unmarshal(b []byte) error { 39 return m.Unmarshal(b) 40 } 41 func (m *BlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 42 if deterministic { 43 return xxx_messageInfo_BlockResponse.Marshal(b, m, deterministic) 44 } else { 45 b = b[:cap(b)] 46 n, err := m.MarshalToSizedBuffer(b) 47 if err != nil { 48 return nil, err 49 } 50 return b[:n], nil 51 } 52 } 53 func (m *BlockResponse) XXX_Merge(src proto.Message) { 54 xxx_messageInfo_BlockResponse.Merge(m, src) 55 } 56 func (m *BlockResponse) XXX_Size() int { 57 return m.Size() 58 } 59 func (m *BlockResponse) XXX_DiscardUnknown() { 60 xxx_messageInfo_BlockResponse.DiscardUnknown(m) 61 } 62 63 var xxx_messageInfo_BlockResponse proto.InternalMessageInfo 64 65 func (m *BlockResponse) GetBlock() *types.Block { 66 if m != nil { 67 return m.Block 68 } 69 return nil 70 } 71 72 type Message struct { 73 // Types that are valid to be assigned to Sum: 74 // *Message_BlockRequest 75 // *Message_NoBlockResponse 76 // *Message_BlockResponse 77 // *Message_StatusRequest 78 // *Message_StatusResponse 79 Sum isMessage_Sum `protobuf_oneof:"sum"` 80 } 81 82 func (m *Message) Reset() { *m = Message{} } 83 func (m *Message) String() string { return proto.CompactTextString(m) } 84 func (*Message) ProtoMessage() {} 85 func (*Message) Descriptor() ([]byte, []int) { 86 return fileDescriptor_8fcd44ecf244cfa3, []int{1} 87 } 88 func (m *Message) XXX_Unmarshal(b []byte) error { 89 return m.Unmarshal(b) 90 } 91 func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 92 if deterministic { 93 return xxx_messageInfo_Message.Marshal(b, m, deterministic) 94 } else { 95 b = b[:cap(b)] 96 n, err := m.MarshalToSizedBuffer(b) 97 if err != nil { 98 return nil, err 99 } 100 return b[:n], nil 101 } 102 } 103 func (m *Message) XXX_Merge(src proto.Message) { 104 xxx_messageInfo_Message.Merge(m, src) 105 } 106 func (m *Message) XXX_Size() int { 107 return m.Size() 108 } 109 func (m *Message) XXX_DiscardUnknown() { 110 xxx_messageInfo_Message.DiscardUnknown(m) 111 } 112 113 var xxx_messageInfo_Message proto.InternalMessageInfo 114 115 type isMessage_Sum interface { 116 isMessage_Sum() 117 MarshalTo([]byte) (int, error) 118 Size() int 119 } 120 121 type Message_BlockRequest struct { 122 BlockRequest *blockchain.BlockRequest `protobuf:"bytes,1,opt,name=block_request,json=blockRequest,proto3,oneof" json:"block_request,omitempty"` 123 } 124 type Message_NoBlockResponse struct { 125 NoBlockResponse *blockchain.NoBlockResponse `protobuf:"bytes,2,opt,name=no_block_response,json=noBlockResponse,proto3,oneof" json:"no_block_response,omitempty"` 126 } 127 type Message_BlockResponse struct { 128 BlockResponse *BlockResponse `protobuf:"bytes,3,opt,name=block_response,json=blockResponse,proto3,oneof" json:"block_response,omitempty"` 129 } 130 type Message_StatusRequest struct { 131 StatusRequest *blockchain.StatusRequest `protobuf:"bytes,4,opt,name=status_request,json=statusRequest,proto3,oneof" json:"status_request,omitempty"` 132 } 133 type Message_StatusResponse struct { 134 StatusResponse *blockchain.StatusResponse `protobuf:"bytes,5,opt,name=status_response,json=statusResponse,proto3,oneof" json:"status_response,omitempty"` 135 } 136 137 func (*Message_BlockRequest) isMessage_Sum() {} 138 func (*Message_NoBlockResponse) isMessage_Sum() {} 139 func (*Message_BlockResponse) isMessage_Sum() {} 140 func (*Message_StatusRequest) isMessage_Sum() {} 141 func (*Message_StatusResponse) isMessage_Sum() {} 142 143 func (m *Message) GetSum() isMessage_Sum { 144 if m != nil { 145 return m.Sum 146 } 147 return nil 148 } 149 150 func (m *Message) GetBlockRequest() *blockchain.BlockRequest { 151 if x, ok := m.GetSum().(*Message_BlockRequest); ok { 152 return x.BlockRequest 153 } 154 return nil 155 } 156 157 func (m *Message) GetNoBlockResponse() *blockchain.NoBlockResponse { 158 if x, ok := m.GetSum().(*Message_NoBlockResponse); ok { 159 return x.NoBlockResponse 160 } 161 return nil 162 } 163 164 func (m *Message) GetBlockResponse() *BlockResponse { 165 if x, ok := m.GetSum().(*Message_BlockResponse); ok { 166 return x.BlockResponse 167 } 168 return nil 169 } 170 171 func (m *Message) GetStatusRequest() *blockchain.StatusRequest { 172 if x, ok := m.GetSum().(*Message_StatusRequest); ok { 173 return x.StatusRequest 174 } 175 return nil 176 } 177 178 func (m *Message) GetStatusResponse() *blockchain.StatusResponse { 179 if x, ok := m.GetSum().(*Message_StatusResponse); ok { 180 return x.StatusResponse 181 } 182 return nil 183 } 184 185 // XXX_OneofWrappers is for the internal use of the proto package. 186 func (*Message) XXX_OneofWrappers() []interface{} { 187 return []interface{}{ 188 (*Message_BlockRequest)(nil), 189 (*Message_NoBlockResponse)(nil), 190 (*Message_BlockResponse)(nil), 191 (*Message_StatusRequest)(nil), 192 (*Message_StatusResponse)(nil), 193 } 194 } 195 196 func init() { 197 proto.RegisterType((*BlockResponse)(nil), "ostracon.blockchain.BlockResponse") 198 proto.RegisterType((*Message)(nil), "ostracon.blockchain.Message") 199 } 200 201 func init() { proto.RegisterFile("ostracon/blockchain/types.proto", fileDescriptor_8fcd44ecf244cfa3) } 202 203 var fileDescriptor_8fcd44ecf244cfa3 = []byte{ 204 // 336 bytes of a gzipped FileDescriptorProto 205 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xcf, 0x4a, 0xc3, 0x40, 206 0x10, 0x87, 0x13, 0x6b, 0x15, 0x56, 0xd3, 0xe2, 0x8a, 0x50, 0x7a, 0x58, 0xb5, 0xfe, 0x41, 0x10, 207 0x36, 0x50, 0xaf, 0x9e, 0x7a, 0x2a, 0x6a, 0x45, 0xaa, 0x27, 0x2f, 0x25, 0x89, 0x4b, 0x1b, 0x6c, 208 0x77, 0x6b, 0x66, 0x73, 0xf0, 0x2d, 0x7c, 0x04, 0x1f, 0xc7, 0x63, 0x8f, 0x1e, 0x25, 0x79, 0x11, 209 0x71, 0x37, 0xdd, 0x24, 0xa5, 0xc1, 0x63, 0x66, 0xbe, 0xf9, 0xf2, 0x9b, 0x65, 0xd0, 0xa1, 0x00, 210 0x19, 0x79, 0x81, 0xe0, 0xae, 0x3f, 0x15, 0xc1, 0x6b, 0x30, 0xf1, 0x42, 0xee, 0xca, 0xf7, 0x39, 211 0x03, 0x3a, 0x8f, 0x84, 0x14, 0x78, 0x7f, 0x09, 0xd0, 0x1c, 0x68, 0xb7, 0xcd, 0x94, 0x42, 0xf5, 212 0xac, 0x1e, 0x68, 0x1f, 0x4b, 0xc6, 0x5f, 0x58, 0x34, 0x0b, 0xb9, 0xac, 0x70, 0x76, 0xae, 0x91, 213 0xd3, 0xfb, 0xeb, 0x0c, 0x19, 0xcc, 0x05, 0x07, 0x86, 0x2f, 0x51, 0x5d, 0xa1, 0x2d, 0xfb, 0xc8, 214 0xbe, 0xd8, 0xe9, 0x1e, 0x50, 0xf3, 0x53, 0x3d, 0xa6, 0x69, 0xcd, 0x74, 0x3e, 0x6b, 0x68, 0x7b, 215 0xc0, 0x00, 0xbc, 0x31, 0xc3, 0x37, 0xc8, 0x51, 0xc5, 0x51, 0xc4, 0xde, 0x62, 0x06, 0x32, 0x13, 216 0x9c, 0xd0, 0x3c, 0x44, 0x21, 0x77, 0xe6, 0xd1, 0x68, 0xdf, 0x1a, 0xee, 0xfa, 0x85, 0x6f, 0xfc, 217 0x84, 0xf6, 0xb8, 0x18, 0x2d, 0x75, 0x3a, 0x59, 0x6b, 0x43, 0xf9, 0xce, 0x2b, 0x7c, 0xf7, 0xa2, 218 0xb4, 0x47, 0xdf, 0x1a, 0x36, 0x79, 0xb9, 0x84, 0x6f, 0x51, 0x63, 0x45, 0x59, 0x53, 0xca, 0x0e, 219 0x5d, 0xf3, 0xb0, 0x74, 0x55, 0xe7, 0xf8, 0x25, 0xd9, 0x00, 0x35, 0x40, 0x7a, 0x32, 0x06, 0xb3, 220 0xef, 0xa6, 0x92, 0x9d, 0x56, 0xe4, 0x7b, 0x54, 0x70, 0xbe, 0xb0, 0x03, 0xc5, 0x02, 0x7e, 0x40, 221 0x4d, 0xa3, 0xcb, 0xc2, 0xd5, 0x95, 0xef, 0xec, 0x1f, 0x9f, 0xc9, 0xd7, 0x80, 0x52, 0xa5, 0x57, 222 0x47, 0x35, 0x88, 0x67, 0xbd, 0xbb, 0xaf, 0x84, 0xd8, 0x8b, 0x84, 0xd8, 0x3f, 0x09, 0xb1, 0x3f, 223 0x52, 0x62, 0x2d, 0x52, 0x62, 0x7d, 0xa7, 0xc4, 0x7a, 0xee, 0x8e, 0x43, 0x39, 0x89, 0x7d, 0x1a, 224 0x88, 0x99, 0x3b, 0x0d, 0x39, 0x73, 0xcd, 0x25, 0xa9, 0xd3, 0x70, 0xd7, 0x9c, 0xa3, 0xbf, 0xa5, 225 0x5a, 0x57, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x41, 0x33, 0x04, 0xec, 0xac, 0x02, 0x00, 0x00, 226 } 227 228 func (m *BlockResponse) Marshal() (dAtA []byte, err error) { 229 size := m.Size() 230 dAtA = make([]byte, size) 231 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 232 if err != nil { 233 return nil, err 234 } 235 return dAtA[:n], nil 236 } 237 238 func (m *BlockResponse) MarshalTo(dAtA []byte) (int, error) { 239 size := m.Size() 240 return m.MarshalToSizedBuffer(dAtA[:size]) 241 } 242 243 func (m *BlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 244 i := len(dAtA) 245 _ = i 246 var l int 247 _ = l 248 if m.Block != nil { 249 { 250 size, err := m.Block.MarshalToSizedBuffer(dAtA[:i]) 251 if err != nil { 252 return 0, err 253 } 254 i -= size 255 i = encodeVarintTypes(dAtA, i, uint64(size)) 256 } 257 i-- 258 dAtA[i] = 0xa 259 } 260 return len(dAtA) - i, nil 261 } 262 263 func (m *Message) Marshal() (dAtA []byte, err error) { 264 size := m.Size() 265 dAtA = make([]byte, size) 266 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 267 if err != nil { 268 return nil, err 269 } 270 return dAtA[:n], nil 271 } 272 273 func (m *Message) MarshalTo(dAtA []byte) (int, error) { 274 size := m.Size() 275 return m.MarshalToSizedBuffer(dAtA[:size]) 276 } 277 278 func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error) { 279 i := len(dAtA) 280 _ = i 281 var l int 282 _ = l 283 if m.Sum != nil { 284 { 285 size := m.Sum.Size() 286 i -= size 287 if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { 288 return 0, err 289 } 290 } 291 } 292 return len(dAtA) - i, nil 293 } 294 295 func (m *Message_BlockRequest) MarshalTo(dAtA []byte) (int, error) { 296 size := m.Size() 297 return m.MarshalToSizedBuffer(dAtA[:size]) 298 } 299 300 func (m *Message_BlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 301 i := len(dAtA) 302 if m.BlockRequest != nil { 303 { 304 size, err := m.BlockRequest.MarshalToSizedBuffer(dAtA[:i]) 305 if err != nil { 306 return 0, err 307 } 308 i -= size 309 i = encodeVarintTypes(dAtA, i, uint64(size)) 310 } 311 i-- 312 dAtA[i] = 0xa 313 } 314 return len(dAtA) - i, nil 315 } 316 func (m *Message_NoBlockResponse) MarshalTo(dAtA []byte) (int, error) { 317 size := m.Size() 318 return m.MarshalToSizedBuffer(dAtA[:size]) 319 } 320 321 func (m *Message_NoBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 322 i := len(dAtA) 323 if m.NoBlockResponse != nil { 324 { 325 size, err := m.NoBlockResponse.MarshalToSizedBuffer(dAtA[:i]) 326 if err != nil { 327 return 0, err 328 } 329 i -= size 330 i = encodeVarintTypes(dAtA, i, uint64(size)) 331 } 332 i-- 333 dAtA[i] = 0x12 334 } 335 return len(dAtA) - i, nil 336 } 337 func (m *Message_BlockResponse) MarshalTo(dAtA []byte) (int, error) { 338 size := m.Size() 339 return m.MarshalToSizedBuffer(dAtA[:size]) 340 } 341 342 func (m *Message_BlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 343 i := len(dAtA) 344 if m.BlockResponse != nil { 345 { 346 size, err := m.BlockResponse.MarshalToSizedBuffer(dAtA[:i]) 347 if err != nil { 348 return 0, err 349 } 350 i -= size 351 i = encodeVarintTypes(dAtA, i, uint64(size)) 352 } 353 i-- 354 dAtA[i] = 0x1a 355 } 356 return len(dAtA) - i, nil 357 } 358 func (m *Message_StatusRequest) MarshalTo(dAtA []byte) (int, error) { 359 size := m.Size() 360 return m.MarshalToSizedBuffer(dAtA[:size]) 361 } 362 363 func (m *Message_StatusRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 364 i := len(dAtA) 365 if m.StatusRequest != nil { 366 { 367 size, err := m.StatusRequest.MarshalToSizedBuffer(dAtA[:i]) 368 if err != nil { 369 return 0, err 370 } 371 i -= size 372 i = encodeVarintTypes(dAtA, i, uint64(size)) 373 } 374 i-- 375 dAtA[i] = 0x22 376 } 377 return len(dAtA) - i, nil 378 } 379 func (m *Message_StatusResponse) MarshalTo(dAtA []byte) (int, error) { 380 size := m.Size() 381 return m.MarshalToSizedBuffer(dAtA[:size]) 382 } 383 384 func (m *Message_StatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 385 i := len(dAtA) 386 if m.StatusResponse != nil { 387 { 388 size, err := m.StatusResponse.MarshalToSizedBuffer(dAtA[:i]) 389 if err != nil { 390 return 0, err 391 } 392 i -= size 393 i = encodeVarintTypes(dAtA, i, uint64(size)) 394 } 395 i-- 396 dAtA[i] = 0x2a 397 } 398 return len(dAtA) - i, nil 399 } 400 func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { 401 offset -= sovTypes(v) 402 base := offset 403 for v >= 1<<7 { 404 dAtA[offset] = uint8(v&0x7f | 0x80) 405 v >>= 7 406 offset++ 407 } 408 dAtA[offset] = uint8(v) 409 return base 410 } 411 func (m *BlockResponse) Size() (n int) { 412 if m == nil { 413 return 0 414 } 415 var l int 416 _ = l 417 if m.Block != nil { 418 l = m.Block.Size() 419 n += 1 + l + sovTypes(uint64(l)) 420 } 421 return n 422 } 423 424 func (m *Message) Size() (n int) { 425 if m == nil { 426 return 0 427 } 428 var l int 429 _ = l 430 if m.Sum != nil { 431 n += m.Sum.Size() 432 } 433 return n 434 } 435 436 func (m *Message_BlockRequest) Size() (n int) { 437 if m == nil { 438 return 0 439 } 440 var l int 441 _ = l 442 if m.BlockRequest != nil { 443 l = m.BlockRequest.Size() 444 n += 1 + l + sovTypes(uint64(l)) 445 } 446 return n 447 } 448 func (m *Message_NoBlockResponse) Size() (n int) { 449 if m == nil { 450 return 0 451 } 452 var l int 453 _ = l 454 if m.NoBlockResponse != nil { 455 l = m.NoBlockResponse.Size() 456 n += 1 + l + sovTypes(uint64(l)) 457 } 458 return n 459 } 460 func (m *Message_BlockResponse) Size() (n int) { 461 if m == nil { 462 return 0 463 } 464 var l int 465 _ = l 466 if m.BlockResponse != nil { 467 l = m.BlockResponse.Size() 468 n += 1 + l + sovTypes(uint64(l)) 469 } 470 return n 471 } 472 func (m *Message_StatusRequest) Size() (n int) { 473 if m == nil { 474 return 0 475 } 476 var l int 477 _ = l 478 if m.StatusRequest != nil { 479 l = m.StatusRequest.Size() 480 n += 1 + l + sovTypes(uint64(l)) 481 } 482 return n 483 } 484 func (m *Message_StatusResponse) Size() (n int) { 485 if m == nil { 486 return 0 487 } 488 var l int 489 _ = l 490 if m.StatusResponse != nil { 491 l = m.StatusResponse.Size() 492 n += 1 + l + sovTypes(uint64(l)) 493 } 494 return n 495 } 496 497 func sovTypes(x uint64) (n int) { 498 return (math_bits.Len64(x|1) + 6) / 7 499 } 500 func sozTypes(x uint64) (n int) { 501 return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 502 } 503 func (m *BlockResponse) Unmarshal(dAtA []byte) error { 504 l := len(dAtA) 505 iNdEx := 0 506 for iNdEx < l { 507 preIndex := iNdEx 508 var wire uint64 509 for shift := uint(0); ; shift += 7 { 510 if shift >= 64 { 511 return ErrIntOverflowTypes 512 } 513 if iNdEx >= l { 514 return io.ErrUnexpectedEOF 515 } 516 b := dAtA[iNdEx] 517 iNdEx++ 518 wire |= uint64(b&0x7F) << shift 519 if b < 0x80 { 520 break 521 } 522 } 523 fieldNum := int32(wire >> 3) 524 wireType := int(wire & 0x7) 525 if wireType == 4 { 526 return fmt.Errorf("proto: BlockResponse: wiretype end group for non-group") 527 } 528 if fieldNum <= 0 { 529 return fmt.Errorf("proto: BlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) 530 } 531 switch fieldNum { 532 case 1: 533 if wireType != 2 { 534 return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) 535 } 536 var msglen int 537 for shift := uint(0); ; shift += 7 { 538 if shift >= 64 { 539 return ErrIntOverflowTypes 540 } 541 if iNdEx >= l { 542 return io.ErrUnexpectedEOF 543 } 544 b := dAtA[iNdEx] 545 iNdEx++ 546 msglen |= int(b&0x7F) << shift 547 if b < 0x80 { 548 break 549 } 550 } 551 if msglen < 0 { 552 return ErrInvalidLengthTypes 553 } 554 postIndex := iNdEx + msglen 555 if postIndex < 0 { 556 return ErrInvalidLengthTypes 557 } 558 if postIndex > l { 559 return io.ErrUnexpectedEOF 560 } 561 if m.Block == nil { 562 m.Block = &types.Block{} 563 } 564 if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 565 return err 566 } 567 iNdEx = postIndex 568 default: 569 iNdEx = preIndex 570 skippy, err := skipTypes(dAtA[iNdEx:]) 571 if err != nil { 572 return err 573 } 574 if (skippy < 0) || (iNdEx+skippy) < 0 { 575 return ErrInvalidLengthTypes 576 } 577 if (iNdEx + skippy) > l { 578 return io.ErrUnexpectedEOF 579 } 580 iNdEx += skippy 581 } 582 } 583 584 if iNdEx > l { 585 return io.ErrUnexpectedEOF 586 } 587 return nil 588 } 589 func (m *Message) Unmarshal(dAtA []byte) error { 590 l := len(dAtA) 591 iNdEx := 0 592 for iNdEx < l { 593 preIndex := iNdEx 594 var wire uint64 595 for shift := uint(0); ; shift += 7 { 596 if shift >= 64 { 597 return ErrIntOverflowTypes 598 } 599 if iNdEx >= l { 600 return io.ErrUnexpectedEOF 601 } 602 b := dAtA[iNdEx] 603 iNdEx++ 604 wire |= uint64(b&0x7F) << shift 605 if b < 0x80 { 606 break 607 } 608 } 609 fieldNum := int32(wire >> 3) 610 wireType := int(wire & 0x7) 611 if wireType == 4 { 612 return fmt.Errorf("proto: Message: wiretype end group for non-group") 613 } 614 if fieldNum <= 0 { 615 return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) 616 } 617 switch fieldNum { 618 case 1: 619 if wireType != 2 { 620 return fmt.Errorf("proto: wrong wireType = %d for field BlockRequest", wireType) 621 } 622 var msglen int 623 for shift := uint(0); ; shift += 7 { 624 if shift >= 64 { 625 return ErrIntOverflowTypes 626 } 627 if iNdEx >= l { 628 return io.ErrUnexpectedEOF 629 } 630 b := dAtA[iNdEx] 631 iNdEx++ 632 msglen |= int(b&0x7F) << shift 633 if b < 0x80 { 634 break 635 } 636 } 637 if msglen < 0 { 638 return ErrInvalidLengthTypes 639 } 640 postIndex := iNdEx + msglen 641 if postIndex < 0 { 642 return ErrInvalidLengthTypes 643 } 644 if postIndex > l { 645 return io.ErrUnexpectedEOF 646 } 647 v := &blockchain.BlockRequest{} 648 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 649 return err 650 } 651 m.Sum = &Message_BlockRequest{v} 652 iNdEx = postIndex 653 case 2: 654 if wireType != 2 { 655 return fmt.Errorf("proto: wrong wireType = %d for field NoBlockResponse", wireType) 656 } 657 var msglen int 658 for shift := uint(0); ; shift += 7 { 659 if shift >= 64 { 660 return ErrIntOverflowTypes 661 } 662 if iNdEx >= l { 663 return io.ErrUnexpectedEOF 664 } 665 b := dAtA[iNdEx] 666 iNdEx++ 667 msglen |= int(b&0x7F) << shift 668 if b < 0x80 { 669 break 670 } 671 } 672 if msglen < 0 { 673 return ErrInvalidLengthTypes 674 } 675 postIndex := iNdEx + msglen 676 if postIndex < 0 { 677 return ErrInvalidLengthTypes 678 } 679 if postIndex > l { 680 return io.ErrUnexpectedEOF 681 } 682 v := &blockchain.NoBlockResponse{} 683 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 684 return err 685 } 686 m.Sum = &Message_NoBlockResponse{v} 687 iNdEx = postIndex 688 case 3: 689 if wireType != 2 { 690 return fmt.Errorf("proto: wrong wireType = %d for field BlockResponse", wireType) 691 } 692 var msglen int 693 for shift := uint(0); ; shift += 7 { 694 if shift >= 64 { 695 return ErrIntOverflowTypes 696 } 697 if iNdEx >= l { 698 return io.ErrUnexpectedEOF 699 } 700 b := dAtA[iNdEx] 701 iNdEx++ 702 msglen |= int(b&0x7F) << shift 703 if b < 0x80 { 704 break 705 } 706 } 707 if msglen < 0 { 708 return ErrInvalidLengthTypes 709 } 710 postIndex := iNdEx + msglen 711 if postIndex < 0 { 712 return ErrInvalidLengthTypes 713 } 714 if postIndex > l { 715 return io.ErrUnexpectedEOF 716 } 717 v := &BlockResponse{} 718 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 719 return err 720 } 721 m.Sum = &Message_BlockResponse{v} 722 iNdEx = postIndex 723 case 4: 724 if wireType != 2 { 725 return fmt.Errorf("proto: wrong wireType = %d for field StatusRequest", wireType) 726 } 727 var msglen int 728 for shift := uint(0); ; shift += 7 { 729 if shift >= 64 { 730 return ErrIntOverflowTypes 731 } 732 if iNdEx >= l { 733 return io.ErrUnexpectedEOF 734 } 735 b := dAtA[iNdEx] 736 iNdEx++ 737 msglen |= int(b&0x7F) << shift 738 if b < 0x80 { 739 break 740 } 741 } 742 if msglen < 0 { 743 return ErrInvalidLengthTypes 744 } 745 postIndex := iNdEx + msglen 746 if postIndex < 0 { 747 return ErrInvalidLengthTypes 748 } 749 if postIndex > l { 750 return io.ErrUnexpectedEOF 751 } 752 v := &blockchain.StatusRequest{} 753 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 754 return err 755 } 756 m.Sum = &Message_StatusRequest{v} 757 iNdEx = postIndex 758 case 5: 759 if wireType != 2 { 760 return fmt.Errorf("proto: wrong wireType = %d for field StatusResponse", wireType) 761 } 762 var msglen int 763 for shift := uint(0); ; shift += 7 { 764 if shift >= 64 { 765 return ErrIntOverflowTypes 766 } 767 if iNdEx >= l { 768 return io.ErrUnexpectedEOF 769 } 770 b := dAtA[iNdEx] 771 iNdEx++ 772 msglen |= int(b&0x7F) << shift 773 if b < 0x80 { 774 break 775 } 776 } 777 if msglen < 0 { 778 return ErrInvalidLengthTypes 779 } 780 postIndex := iNdEx + msglen 781 if postIndex < 0 { 782 return ErrInvalidLengthTypes 783 } 784 if postIndex > l { 785 return io.ErrUnexpectedEOF 786 } 787 v := &blockchain.StatusResponse{} 788 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 789 return err 790 } 791 m.Sum = &Message_StatusResponse{v} 792 iNdEx = postIndex 793 default: 794 iNdEx = preIndex 795 skippy, err := skipTypes(dAtA[iNdEx:]) 796 if err != nil { 797 return err 798 } 799 if (skippy < 0) || (iNdEx+skippy) < 0 { 800 return ErrInvalidLengthTypes 801 } 802 if (iNdEx + skippy) > l { 803 return io.ErrUnexpectedEOF 804 } 805 iNdEx += skippy 806 } 807 } 808 809 if iNdEx > l { 810 return io.ErrUnexpectedEOF 811 } 812 return nil 813 } 814 func skipTypes(dAtA []byte) (n int, err error) { 815 l := len(dAtA) 816 iNdEx := 0 817 depth := 0 818 for iNdEx < l { 819 var wire uint64 820 for shift := uint(0); ; shift += 7 { 821 if shift >= 64 { 822 return 0, ErrIntOverflowTypes 823 } 824 if iNdEx >= l { 825 return 0, io.ErrUnexpectedEOF 826 } 827 b := dAtA[iNdEx] 828 iNdEx++ 829 wire |= (uint64(b) & 0x7F) << shift 830 if b < 0x80 { 831 break 832 } 833 } 834 wireType := int(wire & 0x7) 835 switch wireType { 836 case 0: 837 for shift := uint(0); ; shift += 7 { 838 if shift >= 64 { 839 return 0, ErrIntOverflowTypes 840 } 841 if iNdEx >= l { 842 return 0, io.ErrUnexpectedEOF 843 } 844 iNdEx++ 845 if dAtA[iNdEx-1] < 0x80 { 846 break 847 } 848 } 849 case 1: 850 iNdEx += 8 851 case 2: 852 var length int 853 for shift := uint(0); ; shift += 7 { 854 if shift >= 64 { 855 return 0, ErrIntOverflowTypes 856 } 857 if iNdEx >= l { 858 return 0, io.ErrUnexpectedEOF 859 } 860 b := dAtA[iNdEx] 861 iNdEx++ 862 length |= (int(b) & 0x7F) << shift 863 if b < 0x80 { 864 break 865 } 866 } 867 if length < 0 { 868 return 0, ErrInvalidLengthTypes 869 } 870 iNdEx += length 871 case 3: 872 depth++ 873 case 4: 874 if depth == 0 { 875 return 0, ErrUnexpectedEndOfGroupTypes 876 } 877 depth-- 878 case 5: 879 iNdEx += 4 880 default: 881 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 882 } 883 if iNdEx < 0 { 884 return 0, ErrInvalidLengthTypes 885 } 886 if depth == 0 { 887 return iNdEx, nil 888 } 889 } 890 return 0, io.ErrUnexpectedEOF 891 } 892 893 var ( 894 ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") 895 ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") 896 ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") 897 )