github.com/ethersphere/bee/v2@v2.2.0/pkg/status/internal/pb/status.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: status.proto 3 4 package pb 5 6 import ( 7 encoding_binary "encoding/binary" 8 fmt "fmt" 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 // Get message indicate interest in receiving a node Snapshot. 27 type Get struct { 28 } 29 30 func (m *Get) Reset() { *m = Get{} } 31 func (m *Get) String() string { return proto.CompactTextString(m) } 32 func (*Get) ProtoMessage() {} 33 func (*Get) Descriptor() ([]byte, []int) { 34 return fileDescriptor_dfe4fce6682daf5b, []int{0} 35 } 36 func (m *Get) XXX_Unmarshal(b []byte) error { 37 return m.Unmarshal(b) 38 } 39 func (m *Get) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 40 if deterministic { 41 return xxx_messageInfo_Get.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 *Get) XXX_Merge(src proto.Message) { 52 xxx_messageInfo_Get.Merge(m, src) 53 } 54 func (m *Get) XXX_Size() int { 55 return m.Size() 56 } 57 func (m *Get) XXX_DiscardUnknown() { 58 xxx_messageInfo_Get.DiscardUnknown(m) 59 } 60 61 var xxx_messageInfo_Get proto.InternalMessageInfo 62 63 // Snapshot message is a response to the Get message and contains 64 // the appropriate values that are a snapshot of the current state 65 // of the running node. 66 type Snapshot struct { 67 ReserveSize uint64 `protobuf:"varint,1,opt,name=ReserveSize,proto3" json:"ReserveSize,omitempty"` 68 PullsyncRate float64 `protobuf:"fixed64,2,opt,name=PullsyncRate,proto3" json:"PullsyncRate,omitempty"` 69 StorageRadius uint32 `protobuf:"varint,3,opt,name=StorageRadius,proto3" json:"StorageRadius,omitempty"` 70 ConnectedPeers uint64 `protobuf:"varint,4,opt,name=ConnectedPeers,proto3" json:"ConnectedPeers,omitempty"` 71 NeighborhoodSize uint64 `protobuf:"varint,5,opt,name=NeighborhoodSize,proto3" json:"NeighborhoodSize,omitempty"` 72 BeeMode string `protobuf:"bytes,6,opt,name=BeeMode,proto3" json:"BeeMode,omitempty"` 73 BatchCommitment uint64 `protobuf:"varint,7,opt,name=BatchCommitment,proto3" json:"BatchCommitment,omitempty"` 74 IsReachable bool `protobuf:"varint,8,opt,name=IsReachable,proto3" json:"IsReachable,omitempty"` 75 ReserveSizeWithinRadius uint64 `protobuf:"varint,9,opt,name=ReserveSizeWithinRadius,proto3" json:"ReserveSizeWithinRadius,omitempty"` 76 LastSyncedBlock uint64 `protobuf:"varint,10,opt,name=LastSyncedBlock,proto3" json:"LastSyncedBlock,omitempty"` 77 } 78 79 func (m *Snapshot) Reset() { *m = Snapshot{} } 80 func (m *Snapshot) String() string { return proto.CompactTextString(m) } 81 func (*Snapshot) ProtoMessage() {} 82 func (*Snapshot) Descriptor() ([]byte, []int) { 83 return fileDescriptor_dfe4fce6682daf5b, []int{1} 84 } 85 func (m *Snapshot) XXX_Unmarshal(b []byte) error { 86 return m.Unmarshal(b) 87 } 88 func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 89 if deterministic { 90 return xxx_messageInfo_Snapshot.Marshal(b, m, deterministic) 91 } else { 92 b = b[:cap(b)] 93 n, err := m.MarshalToSizedBuffer(b) 94 if err != nil { 95 return nil, err 96 } 97 return b[:n], nil 98 } 99 } 100 func (m *Snapshot) XXX_Merge(src proto.Message) { 101 xxx_messageInfo_Snapshot.Merge(m, src) 102 } 103 func (m *Snapshot) XXX_Size() int { 104 return m.Size() 105 } 106 func (m *Snapshot) XXX_DiscardUnknown() { 107 xxx_messageInfo_Snapshot.DiscardUnknown(m) 108 } 109 110 var xxx_messageInfo_Snapshot proto.InternalMessageInfo 111 112 func (m *Snapshot) GetReserveSize() uint64 { 113 if m != nil { 114 return m.ReserveSize 115 } 116 return 0 117 } 118 119 func (m *Snapshot) GetPullsyncRate() float64 { 120 if m != nil { 121 return m.PullsyncRate 122 } 123 return 0 124 } 125 126 func (m *Snapshot) GetStorageRadius() uint32 { 127 if m != nil { 128 return m.StorageRadius 129 } 130 return 0 131 } 132 133 func (m *Snapshot) GetConnectedPeers() uint64 { 134 if m != nil { 135 return m.ConnectedPeers 136 } 137 return 0 138 } 139 140 func (m *Snapshot) GetNeighborhoodSize() uint64 { 141 if m != nil { 142 return m.NeighborhoodSize 143 } 144 return 0 145 } 146 147 func (m *Snapshot) GetBeeMode() string { 148 if m != nil { 149 return m.BeeMode 150 } 151 return "" 152 } 153 154 func (m *Snapshot) GetBatchCommitment() uint64 { 155 if m != nil { 156 return m.BatchCommitment 157 } 158 return 0 159 } 160 161 func (m *Snapshot) GetIsReachable() bool { 162 if m != nil { 163 return m.IsReachable 164 } 165 return false 166 } 167 168 func (m *Snapshot) GetReserveSizeWithinRadius() uint64 { 169 if m != nil { 170 return m.ReserveSizeWithinRadius 171 } 172 return 0 173 } 174 175 func (m *Snapshot) GetLastSyncedBlock() uint64 { 176 if m != nil { 177 return m.LastSyncedBlock 178 } 179 return 0 180 } 181 182 func init() { 183 proto.RegisterType((*Get)(nil), "status.Get") 184 proto.RegisterType((*Snapshot)(nil), "status.Snapshot") 185 } 186 187 func init() { proto.RegisterFile("status.proto", fileDescriptor_dfe4fce6682daf5b) } 188 189 var fileDescriptor_dfe4fce6682daf5b = []byte{ 190 // 317 bytes of a gzipped FileDescriptorProto 191 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0xd1, 0xbd, 0x4a, 0x03, 0x41, 192 0x10, 0x07, 0xf0, 0x6c, 0xbe, 0x33, 0x26, 0x2a, 0xdb, 0xb8, 0x85, 0x1c, 0x47, 0x10, 0x39, 0x2c, 193 0x6c, 0x6c, 0xac, 0x2f, 0x85, 0x08, 0x2a, 0x61, 0xaf, 0x10, 0xec, 0xf6, 0xee, 0x86, 0xdc, 0xe1, 194 0x65, 0x37, 0xdc, 0x4e, 0x84, 0xf8, 0x14, 0x16, 0x3e, 0x94, 0x65, 0x4a, 0x4b, 0x49, 0x5e, 0x44, 195 0xb2, 0x51, 0x48, 0x4e, 0x2c, 0xe7, 0xb7, 0xcb, 0xec, 0x7f, 0x67, 0xa0, 0x6f, 0x49, 0xd1, 0xdc, 196 0x5e, 0xce, 0x4a, 0x43, 0x86, 0xb7, 0xb7, 0xd5, 0xb0, 0x05, 0x8d, 0x1b, 0xa4, 0xe1, 0x7b, 0x03, 197 0xba, 0x91, 0x56, 0x33, 0x9b, 0x19, 0xe2, 0x3e, 0x1c, 0x48, 0xb4, 0x58, 0xbe, 0x60, 0x94, 0xbf, 198 0xa2, 0x60, 0x3e, 0x0b, 0x9a, 0x72, 0x97, 0xf8, 0x10, 0xfa, 0xe3, 0x79, 0x51, 0xd8, 0x85, 0x4e, 199 0xa4, 0x22, 0x14, 0x75, 0x9f, 0x05, 0x4c, 0xee, 0x19, 0x3f, 0x83, 0x41, 0x44, 0xa6, 0x54, 0x13, 200 0x94, 0x2a, 0xcd, 0xe7, 0x56, 0x34, 0x7c, 0x16, 0x0c, 0xe4, 0x3e, 0xf2, 0x73, 0x38, 0x1c, 0x19, 201 0xad, 0x31, 0x21, 0x4c, 0xc7, 0x88, 0xa5, 0x15, 0x4d, 0xf7, 0x5c, 0x45, 0xf9, 0x05, 0x1c, 0x3f, 202 0x60, 0x3e, 0xc9, 0x62, 0x53, 0x66, 0xc6, 0xa4, 0x2e, 0x58, 0xcb, 0xdd, 0xfc, 0xe3, 0x5c, 0x40, 203 0x27, 0x44, 0xbc, 0x37, 0x29, 0x8a, 0xb6, 0xcf, 0x82, 0x9e, 0xfc, 0x2d, 0x79, 0x00, 0x47, 0xa1, 204 0xa2, 0x24, 0x1b, 0x99, 0xe9, 0x34, 0xa7, 0x29, 0x6a, 0x12, 0x1d, 0xd7, 0xa4, 0xca, 0x9b, 0x19, 205 0xdc, 0x5a, 0x89, 0x2a, 0xc9, 0x54, 0x5c, 0xa0, 0xe8, 0xfa, 0x2c, 0xe8, 0xca, 0x5d, 0xe2, 0xd7, 206 0x70, 0xb2, 0x33, 0x92, 0xc7, 0x9c, 0xb2, 0x5c, 0xff, 0xfc, 0xb4, 0xe7, 0x7a, 0xfe, 0x77, 0xbc, 207 0x49, 0x71, 0xa7, 0x2c, 0x45, 0x0b, 0x9d, 0x60, 0x1a, 0x16, 0x26, 0x79, 0x16, 0xb0, 0x4d, 0x51, 208 0xe1, 0xf0, 0xf4, 0x63, 0xe5, 0xb1, 0xe5, 0xca, 0x63, 0x5f, 0x2b, 0x8f, 0xbd, 0xad, 0xbd, 0xda, 209 0x72, 0xed, 0xd5, 0x3e, 0xd7, 0x5e, 0xed, 0xa9, 0x3e, 0x8b, 0xe3, 0xb6, 0x5b, 0xe5, 0xd5, 0x77, 210 0x00, 0x00, 0x00, 0xff, 0xff, 0x92, 0x33, 0xb8, 0x1e, 0xda, 0x01, 0x00, 0x00, 211 } 212 213 func (m *Get) Marshal() (dAtA []byte, err error) { 214 size := m.Size() 215 dAtA = make([]byte, size) 216 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 217 if err != nil { 218 return nil, err 219 } 220 return dAtA[:n], nil 221 } 222 223 func (m *Get) MarshalTo(dAtA []byte) (int, error) { 224 size := m.Size() 225 return m.MarshalToSizedBuffer(dAtA[:size]) 226 } 227 228 func (m *Get) MarshalToSizedBuffer(dAtA []byte) (int, error) { 229 i := len(dAtA) 230 _ = i 231 var l int 232 _ = l 233 return len(dAtA) - i, nil 234 } 235 236 func (m *Snapshot) Marshal() (dAtA []byte, err error) { 237 size := m.Size() 238 dAtA = make([]byte, size) 239 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 240 if err != nil { 241 return nil, err 242 } 243 return dAtA[:n], nil 244 } 245 246 func (m *Snapshot) MarshalTo(dAtA []byte) (int, error) { 247 size := m.Size() 248 return m.MarshalToSizedBuffer(dAtA[:size]) 249 } 250 251 func (m *Snapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) { 252 i := len(dAtA) 253 _ = i 254 var l int 255 _ = l 256 if m.LastSyncedBlock != 0 { 257 i = encodeVarintStatus(dAtA, i, uint64(m.LastSyncedBlock)) 258 i-- 259 dAtA[i] = 0x50 260 } 261 if m.ReserveSizeWithinRadius != 0 { 262 i = encodeVarintStatus(dAtA, i, uint64(m.ReserveSizeWithinRadius)) 263 i-- 264 dAtA[i] = 0x48 265 } 266 if m.IsReachable { 267 i-- 268 if m.IsReachable { 269 dAtA[i] = 1 270 } else { 271 dAtA[i] = 0 272 } 273 i-- 274 dAtA[i] = 0x40 275 } 276 if m.BatchCommitment != 0 { 277 i = encodeVarintStatus(dAtA, i, uint64(m.BatchCommitment)) 278 i-- 279 dAtA[i] = 0x38 280 } 281 if len(m.BeeMode) > 0 { 282 i -= len(m.BeeMode) 283 copy(dAtA[i:], m.BeeMode) 284 i = encodeVarintStatus(dAtA, i, uint64(len(m.BeeMode))) 285 i-- 286 dAtA[i] = 0x32 287 } 288 if m.NeighborhoodSize != 0 { 289 i = encodeVarintStatus(dAtA, i, uint64(m.NeighborhoodSize)) 290 i-- 291 dAtA[i] = 0x28 292 } 293 if m.ConnectedPeers != 0 { 294 i = encodeVarintStatus(dAtA, i, uint64(m.ConnectedPeers)) 295 i-- 296 dAtA[i] = 0x20 297 } 298 if m.StorageRadius != 0 { 299 i = encodeVarintStatus(dAtA, i, uint64(m.StorageRadius)) 300 i-- 301 dAtA[i] = 0x18 302 } 303 if m.PullsyncRate != 0 { 304 i -= 8 305 encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.PullsyncRate)))) 306 i-- 307 dAtA[i] = 0x11 308 } 309 if m.ReserveSize != 0 { 310 i = encodeVarintStatus(dAtA, i, uint64(m.ReserveSize)) 311 i-- 312 dAtA[i] = 0x8 313 } 314 return len(dAtA) - i, nil 315 } 316 317 func encodeVarintStatus(dAtA []byte, offset int, v uint64) int { 318 offset -= sovStatus(v) 319 base := offset 320 for v >= 1<<7 { 321 dAtA[offset] = uint8(v&0x7f | 0x80) 322 v >>= 7 323 offset++ 324 } 325 dAtA[offset] = uint8(v) 326 return base 327 } 328 func (m *Get) Size() (n int) { 329 if m == nil { 330 return 0 331 } 332 var l int 333 _ = l 334 return n 335 } 336 337 func (m *Snapshot) Size() (n int) { 338 if m == nil { 339 return 0 340 } 341 var l int 342 _ = l 343 if m.ReserveSize != 0 { 344 n += 1 + sovStatus(uint64(m.ReserveSize)) 345 } 346 if m.PullsyncRate != 0 { 347 n += 9 348 } 349 if m.StorageRadius != 0 { 350 n += 1 + sovStatus(uint64(m.StorageRadius)) 351 } 352 if m.ConnectedPeers != 0 { 353 n += 1 + sovStatus(uint64(m.ConnectedPeers)) 354 } 355 if m.NeighborhoodSize != 0 { 356 n += 1 + sovStatus(uint64(m.NeighborhoodSize)) 357 } 358 l = len(m.BeeMode) 359 if l > 0 { 360 n += 1 + l + sovStatus(uint64(l)) 361 } 362 if m.BatchCommitment != 0 { 363 n += 1 + sovStatus(uint64(m.BatchCommitment)) 364 } 365 if m.IsReachable { 366 n += 2 367 } 368 if m.ReserveSizeWithinRadius != 0 { 369 n += 1 + sovStatus(uint64(m.ReserveSizeWithinRadius)) 370 } 371 if m.LastSyncedBlock != 0 { 372 n += 1 + sovStatus(uint64(m.LastSyncedBlock)) 373 } 374 return n 375 } 376 377 func sovStatus(x uint64) (n int) { 378 return (math_bits.Len64(x|1) + 6) / 7 379 } 380 func sozStatus(x uint64) (n int) { 381 return sovStatus(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 382 } 383 func (m *Get) Unmarshal(dAtA []byte) error { 384 l := len(dAtA) 385 iNdEx := 0 386 for iNdEx < l { 387 preIndex := iNdEx 388 var wire uint64 389 for shift := uint(0); ; shift += 7 { 390 if shift >= 64 { 391 return ErrIntOverflowStatus 392 } 393 if iNdEx >= l { 394 return io.ErrUnexpectedEOF 395 } 396 b := dAtA[iNdEx] 397 iNdEx++ 398 wire |= uint64(b&0x7F) << shift 399 if b < 0x80 { 400 break 401 } 402 } 403 fieldNum := int32(wire >> 3) 404 wireType := int(wire & 0x7) 405 if wireType == 4 { 406 return fmt.Errorf("proto: Get: wiretype end group for non-group") 407 } 408 if fieldNum <= 0 { 409 return fmt.Errorf("proto: Get: illegal tag %d (wire type %d)", fieldNum, wire) 410 } 411 switch fieldNum { 412 default: 413 iNdEx = preIndex 414 skippy, err := skipStatus(dAtA[iNdEx:]) 415 if err != nil { 416 return err 417 } 418 if skippy < 0 { 419 return ErrInvalidLengthStatus 420 } 421 if (iNdEx + skippy) < 0 { 422 return ErrInvalidLengthStatus 423 } 424 if (iNdEx + skippy) > l { 425 return io.ErrUnexpectedEOF 426 } 427 iNdEx += skippy 428 } 429 } 430 431 if iNdEx > l { 432 return io.ErrUnexpectedEOF 433 } 434 return nil 435 } 436 func (m *Snapshot) Unmarshal(dAtA []byte) error { 437 l := len(dAtA) 438 iNdEx := 0 439 for iNdEx < l { 440 preIndex := iNdEx 441 var wire uint64 442 for shift := uint(0); ; shift += 7 { 443 if shift >= 64 { 444 return ErrIntOverflowStatus 445 } 446 if iNdEx >= l { 447 return io.ErrUnexpectedEOF 448 } 449 b := dAtA[iNdEx] 450 iNdEx++ 451 wire |= uint64(b&0x7F) << shift 452 if b < 0x80 { 453 break 454 } 455 } 456 fieldNum := int32(wire >> 3) 457 wireType := int(wire & 0x7) 458 if wireType == 4 { 459 return fmt.Errorf("proto: Snapshot: wiretype end group for non-group") 460 } 461 if fieldNum <= 0 { 462 return fmt.Errorf("proto: Snapshot: illegal tag %d (wire type %d)", fieldNum, wire) 463 } 464 switch fieldNum { 465 case 1: 466 if wireType != 0 { 467 return fmt.Errorf("proto: wrong wireType = %d for field ReserveSize", wireType) 468 } 469 m.ReserveSize = 0 470 for shift := uint(0); ; shift += 7 { 471 if shift >= 64 { 472 return ErrIntOverflowStatus 473 } 474 if iNdEx >= l { 475 return io.ErrUnexpectedEOF 476 } 477 b := dAtA[iNdEx] 478 iNdEx++ 479 m.ReserveSize |= uint64(b&0x7F) << shift 480 if b < 0x80 { 481 break 482 } 483 } 484 case 2: 485 if wireType != 1 { 486 return fmt.Errorf("proto: wrong wireType = %d for field PullsyncRate", wireType) 487 } 488 var v uint64 489 if (iNdEx + 8) > l { 490 return io.ErrUnexpectedEOF 491 } 492 v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) 493 iNdEx += 8 494 m.PullsyncRate = float64(math.Float64frombits(v)) 495 case 3: 496 if wireType != 0 { 497 return fmt.Errorf("proto: wrong wireType = %d for field StorageRadius", wireType) 498 } 499 m.StorageRadius = 0 500 for shift := uint(0); ; shift += 7 { 501 if shift >= 64 { 502 return ErrIntOverflowStatus 503 } 504 if iNdEx >= l { 505 return io.ErrUnexpectedEOF 506 } 507 b := dAtA[iNdEx] 508 iNdEx++ 509 m.StorageRadius |= uint32(b&0x7F) << shift 510 if b < 0x80 { 511 break 512 } 513 } 514 case 4: 515 if wireType != 0 { 516 return fmt.Errorf("proto: wrong wireType = %d for field ConnectedPeers", wireType) 517 } 518 m.ConnectedPeers = 0 519 for shift := uint(0); ; shift += 7 { 520 if shift >= 64 { 521 return ErrIntOverflowStatus 522 } 523 if iNdEx >= l { 524 return io.ErrUnexpectedEOF 525 } 526 b := dAtA[iNdEx] 527 iNdEx++ 528 m.ConnectedPeers |= uint64(b&0x7F) << shift 529 if b < 0x80 { 530 break 531 } 532 } 533 case 5: 534 if wireType != 0 { 535 return fmt.Errorf("proto: wrong wireType = %d for field NeighborhoodSize", wireType) 536 } 537 m.NeighborhoodSize = 0 538 for shift := uint(0); ; shift += 7 { 539 if shift >= 64 { 540 return ErrIntOverflowStatus 541 } 542 if iNdEx >= l { 543 return io.ErrUnexpectedEOF 544 } 545 b := dAtA[iNdEx] 546 iNdEx++ 547 m.NeighborhoodSize |= uint64(b&0x7F) << shift 548 if b < 0x80 { 549 break 550 } 551 } 552 case 6: 553 if wireType != 2 { 554 return fmt.Errorf("proto: wrong wireType = %d for field BeeMode", wireType) 555 } 556 var stringLen uint64 557 for shift := uint(0); ; shift += 7 { 558 if shift >= 64 { 559 return ErrIntOverflowStatus 560 } 561 if iNdEx >= l { 562 return io.ErrUnexpectedEOF 563 } 564 b := dAtA[iNdEx] 565 iNdEx++ 566 stringLen |= uint64(b&0x7F) << shift 567 if b < 0x80 { 568 break 569 } 570 } 571 intStringLen := int(stringLen) 572 if intStringLen < 0 { 573 return ErrInvalidLengthStatus 574 } 575 postIndex := iNdEx + intStringLen 576 if postIndex < 0 { 577 return ErrInvalidLengthStatus 578 } 579 if postIndex > l { 580 return io.ErrUnexpectedEOF 581 } 582 m.BeeMode = string(dAtA[iNdEx:postIndex]) 583 iNdEx = postIndex 584 case 7: 585 if wireType != 0 { 586 return fmt.Errorf("proto: wrong wireType = %d for field BatchCommitment", wireType) 587 } 588 m.BatchCommitment = 0 589 for shift := uint(0); ; shift += 7 { 590 if shift >= 64 { 591 return ErrIntOverflowStatus 592 } 593 if iNdEx >= l { 594 return io.ErrUnexpectedEOF 595 } 596 b := dAtA[iNdEx] 597 iNdEx++ 598 m.BatchCommitment |= uint64(b&0x7F) << shift 599 if b < 0x80 { 600 break 601 } 602 } 603 case 8: 604 if wireType != 0 { 605 return fmt.Errorf("proto: wrong wireType = %d for field IsReachable", wireType) 606 } 607 var v int 608 for shift := uint(0); ; shift += 7 { 609 if shift >= 64 { 610 return ErrIntOverflowStatus 611 } 612 if iNdEx >= l { 613 return io.ErrUnexpectedEOF 614 } 615 b := dAtA[iNdEx] 616 iNdEx++ 617 v |= int(b&0x7F) << shift 618 if b < 0x80 { 619 break 620 } 621 } 622 m.IsReachable = bool(v != 0) 623 case 9: 624 if wireType != 0 { 625 return fmt.Errorf("proto: wrong wireType = %d for field ReserveSizeWithinRadius", wireType) 626 } 627 m.ReserveSizeWithinRadius = 0 628 for shift := uint(0); ; shift += 7 { 629 if shift >= 64 { 630 return ErrIntOverflowStatus 631 } 632 if iNdEx >= l { 633 return io.ErrUnexpectedEOF 634 } 635 b := dAtA[iNdEx] 636 iNdEx++ 637 m.ReserveSizeWithinRadius |= uint64(b&0x7F) << shift 638 if b < 0x80 { 639 break 640 } 641 } 642 case 10: 643 if wireType != 0 { 644 return fmt.Errorf("proto: wrong wireType = %d for field LastSyncedBlock", wireType) 645 } 646 m.LastSyncedBlock = 0 647 for shift := uint(0); ; shift += 7 { 648 if shift >= 64 { 649 return ErrIntOverflowStatus 650 } 651 if iNdEx >= l { 652 return io.ErrUnexpectedEOF 653 } 654 b := dAtA[iNdEx] 655 iNdEx++ 656 m.LastSyncedBlock |= uint64(b&0x7F) << shift 657 if b < 0x80 { 658 break 659 } 660 } 661 default: 662 iNdEx = preIndex 663 skippy, err := skipStatus(dAtA[iNdEx:]) 664 if err != nil { 665 return err 666 } 667 if skippy < 0 { 668 return ErrInvalidLengthStatus 669 } 670 if (iNdEx + skippy) < 0 { 671 return ErrInvalidLengthStatus 672 } 673 if (iNdEx + skippy) > l { 674 return io.ErrUnexpectedEOF 675 } 676 iNdEx += skippy 677 } 678 } 679 680 if iNdEx > l { 681 return io.ErrUnexpectedEOF 682 } 683 return nil 684 } 685 func skipStatus(dAtA []byte) (n int, err error) { 686 l := len(dAtA) 687 iNdEx := 0 688 depth := 0 689 for iNdEx < l { 690 var wire uint64 691 for shift := uint(0); ; shift += 7 { 692 if shift >= 64 { 693 return 0, ErrIntOverflowStatus 694 } 695 if iNdEx >= l { 696 return 0, io.ErrUnexpectedEOF 697 } 698 b := dAtA[iNdEx] 699 iNdEx++ 700 wire |= (uint64(b) & 0x7F) << shift 701 if b < 0x80 { 702 break 703 } 704 } 705 wireType := int(wire & 0x7) 706 switch wireType { 707 case 0: 708 for shift := uint(0); ; shift += 7 { 709 if shift >= 64 { 710 return 0, ErrIntOverflowStatus 711 } 712 if iNdEx >= l { 713 return 0, io.ErrUnexpectedEOF 714 } 715 iNdEx++ 716 if dAtA[iNdEx-1] < 0x80 { 717 break 718 } 719 } 720 case 1: 721 iNdEx += 8 722 case 2: 723 var length int 724 for shift := uint(0); ; shift += 7 { 725 if shift >= 64 { 726 return 0, ErrIntOverflowStatus 727 } 728 if iNdEx >= l { 729 return 0, io.ErrUnexpectedEOF 730 } 731 b := dAtA[iNdEx] 732 iNdEx++ 733 length |= (int(b) & 0x7F) << shift 734 if b < 0x80 { 735 break 736 } 737 } 738 if length < 0 { 739 return 0, ErrInvalidLengthStatus 740 } 741 iNdEx += length 742 case 3: 743 depth++ 744 case 4: 745 if depth == 0 { 746 return 0, ErrUnexpectedEndOfGroupStatus 747 } 748 depth-- 749 case 5: 750 iNdEx += 4 751 default: 752 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 753 } 754 if iNdEx < 0 { 755 return 0, ErrInvalidLengthStatus 756 } 757 if depth == 0 { 758 return iNdEx, nil 759 } 760 } 761 return 0, io.ErrUnexpectedEOF 762 } 763 764 var ( 765 ErrInvalidLengthStatus = fmt.Errorf("proto: negative length found during unmarshaling") 766 ErrIntOverflowStatus = fmt.Errorf("proto: integer overflow") 767 ErrUnexpectedEndOfGroupStatus = fmt.Errorf("proto: unexpected end of group") 768 )