1#![allow(unknown_lints)]
6#![allow(clippy::all)]
7
8#![cfg_attr(rustfmt, rustfmt_skip)]
9
10#![allow(box_pointers)]
11#![allow(dead_code)]
12#![allow(missing_docs)]
13#![allow(non_camel_case_types)]
14#![allow(non_snake_case)]
15#![allow(non_upper_case_globals)]
16#![allow(trivial_casts)]
17#![allow(unsafe_code)]
18#![allow(unused_imports)]
19#![allow(unused_results)]
20use protobuf::Message as Message_imported_for_functions;
23use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
24
25const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_10_0;
28
29#[derive(PartialEq,Clone,Default)]
30pub struct PeerId {
31 pub ip: ::std::vec::Vec<u8>,
33 pub port: u32,
34 pub public_key: ::std::vec::Vec<u8>,
35 pub unknown_fields: ::protobuf::UnknownFields,
37 pub cached_size: ::protobuf::CachedSize,
38}
39
40impl<'a> ::std::default::Default for &'a PeerId {
41 fn default() -> &'a PeerId {
42 <PeerId as ::protobuf::Message>::default_instance()
43 }
44}
45
46impl PeerId {
47 pub fn new() -> PeerId {
48 ::std::default::Default::default()
49 }
50
51 pub fn get_ip(&self) -> &[u8] {
55 &self.ip
56 }
57 pub fn clear_ip(&mut self) {
58 self.ip.clear();
59 }
60
61 pub fn set_ip(&mut self, v: ::std::vec::Vec<u8>) {
63 self.ip = v;
64 }
65
66 pub fn mut_ip(&mut self) -> &mut ::std::vec::Vec<u8> {
69 &mut self.ip
70 }
71
72 pub fn take_ip(&mut self) -> ::std::vec::Vec<u8> {
74 ::std::mem::replace(&mut self.ip, ::std::vec::Vec::new())
75 }
76
77 pub fn get_port(&self) -> u32 {
81 self.port
82 }
83 pub fn clear_port(&mut self) {
84 self.port = 0;
85 }
86
87 pub fn set_port(&mut self, v: u32) {
89 self.port = v;
90 }
91
92 pub fn get_public_key(&self) -> &[u8] {
96 &self.public_key
97 }
98 pub fn clear_public_key(&mut self) {
99 self.public_key.clear();
100 }
101
102 pub fn set_public_key(&mut self, v: ::std::vec::Vec<u8>) {
104 self.public_key = v;
105 }
106
107 pub fn mut_public_key(&mut self) -> &mut ::std::vec::Vec<u8> {
110 &mut self.public_key
111 }
112
113 pub fn take_public_key(&mut self) -> ::std::vec::Vec<u8> {
115 ::std::mem::replace(&mut self.public_key, ::std::vec::Vec::new())
116 }
117}
118
119impl ::protobuf::Message for PeerId {
120 fn is_initialized(&self) -> bool {
121 true
122 }
123
124 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
125 while !is.eof()? {
126 let (field_number, wire_type) = is.read_tag_unpack()?;
127 match field_number {
128 1 => {
129 ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.ip)?;
130 },
131 2 => {
132 if wire_type != ::protobuf::wire_format::WireTypeVarint {
133 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
134 }
135 let tmp = is.read_uint32()?;
136 self.port = tmp;
137 },
138 3 => {
139 ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.public_key)?;
140 },
141 _ => {
142 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
143 },
144 };
145 }
146 ::std::result::Result::Ok(())
147 }
148
149 #[allow(unused_variables)]
151 fn compute_size(&self) -> u32 {
152 let mut my_size = 0;
153 if !self.ip.is_empty() {
154 my_size += ::protobuf::rt::bytes_size(1, &self.ip);
155 }
156 if self.port != 0 {
157 my_size += ::protobuf::rt::value_size(2, self.port, ::protobuf::wire_format::WireTypeVarint);
158 }
159 if !self.public_key.is_empty() {
160 my_size += ::protobuf::rt::bytes_size(3, &self.public_key);
161 }
162 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
163 self.cached_size.set(my_size);
164 my_size
165 }
166
167 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
168 if !self.ip.is_empty() {
169 os.write_bytes(1, &self.ip)?;
170 }
171 if self.port != 0 {
172 os.write_uint32(2, self.port)?;
173 }
174 if !self.public_key.is_empty() {
175 os.write_bytes(3, &self.public_key)?;
176 }
177 os.write_unknown_fields(self.get_unknown_fields())?;
178 ::std::result::Result::Ok(())
179 }
180
181 fn get_cached_size(&self) -> u32 {
182 self.cached_size.get()
183 }
184
185 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
186 &self.unknown_fields
187 }
188
189 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
190 &mut self.unknown_fields
191 }
192
193 fn as_any(&self) -> &dyn (::std::any::Any) {
194 self as &dyn (::std::any::Any)
195 }
196 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
197 self as &mut dyn (::std::any::Any)
198 }
199 fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
200 self
201 }
202
203 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
204 Self::descriptor_static()
205 }
206
207 fn new() -> PeerId {
208 PeerId::new()
209 }
210
211 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
212 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
213 lock: ::protobuf::lazy::ONCE_INIT,
214 ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
215 };
216 unsafe {
217 descriptor.get(|| {
218 let mut fields = ::std::vec::Vec::new();
219 fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
220 "ip",
221 |m: &PeerId| { &m.ip },
222 |m: &mut PeerId| { &mut m.ip },
223 ));
224 fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
225 "port",
226 |m: &PeerId| { &m.port },
227 |m: &mut PeerId| { &mut m.port },
228 ));
229 fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
230 "public_key",
231 |m: &PeerId| { &m.public_key },
232 |m: &mut PeerId| { &mut m.public_key },
233 ));
234 ::protobuf::reflect::MessageDescriptor::new::<PeerId>(
235 "PeerId",
236 fields,
237 file_descriptor_proto()
238 )
239 })
240 }
241 }
242
243 fn default_instance() -> &'static PeerId {
244 static mut instance: ::protobuf::lazy::Lazy<PeerId> = ::protobuf::lazy::Lazy {
245 lock: ::protobuf::lazy::ONCE_INIT,
246 ptr: 0 as *const PeerId,
247 };
248 unsafe {
249 instance.get(PeerId::new)
250 }
251 }
252}
253
254impl ::protobuf::Clear for PeerId {
255 fn clear(&mut self) {
256 self.ip.clear();
257 self.port = 0;
258 self.public_key.clear();
259 self.unknown_fields.clear();
260 }
261}
262
263impl ::std::fmt::Debug for PeerId {
264 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
265 ::protobuf::text_format::fmt(self, f)
266 }
267}
268
269impl ::protobuf::reflect::ProtobufValue for PeerId {
270 fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
271 ::protobuf::reflect::ProtobufValueRef::Message(self)
272 }
273}
274
275#[derive(PartialEq,Clone,Default)]
276pub struct PeerInfo {
277 pub peer_id: ::protobuf::SingularPtrField<PeerId>,
279 pub reputation: i32,
280 pub is_blacklisted: bool,
281 pub is_unreachable: bool,
282 pub inactive_for: ::protobuf::SingularPtrField<::protobuf::well_known_types::Duration>,
283 pub last_seen: ::protobuf::SingularPtrField<::protobuf::well_known_types::Timestamp>,
284 pub modified: ::protobuf::SingularPtrField<::protobuf::well_known_types::Timestamp>,
285 pub created: ::protobuf::SingularPtrField<::protobuf::well_known_types::Timestamp>,
286 pub unknown_fields: ::protobuf::UnknownFields,
288 pub cached_size: ::protobuf::CachedSize,
289}
290
291impl<'a> ::std::default::Default for &'a PeerInfo {
292 fn default() -> &'a PeerInfo {
293 <PeerInfo as ::protobuf::Message>::default_instance()
294 }
295}
296
297impl PeerInfo {
298 pub fn new() -> PeerInfo {
299 ::std::default::Default::default()
300 }
301
302 pub fn get_peer_id(&self) -> &PeerId {
306 self.peer_id.as_ref().unwrap_or_else(|| PeerId::default_instance())
307 }
308 pub fn clear_peer_id(&mut self) {
309 self.peer_id.clear();
310 }
311
312 pub fn has_peer_id(&self) -> bool {
313 self.peer_id.is_some()
314 }
315
316 pub fn set_peer_id(&mut self, v: PeerId) {
318 self.peer_id = ::protobuf::SingularPtrField::some(v);
319 }
320
321 pub fn mut_peer_id(&mut self) -> &mut PeerId {
324 if self.peer_id.is_none() {
325 self.peer_id.set_default();
326 }
327 self.peer_id.as_mut().unwrap()
328 }
329
330 pub fn take_peer_id(&mut self) -> PeerId {
332 self.peer_id.take().unwrap_or_else(|| PeerId::new())
333 }
334
335 pub fn get_reputation(&self) -> i32 {
339 self.reputation
340 }
341 pub fn clear_reputation(&mut self) {
342 self.reputation = 0;
343 }
344
345 pub fn set_reputation(&mut self, v: i32) {
347 self.reputation = v;
348 }
349
350 pub fn get_is_blacklisted(&self) -> bool {
354 self.is_blacklisted
355 }
356 pub fn clear_is_blacklisted(&mut self) {
357 self.is_blacklisted = false;
358 }
359
360 pub fn set_is_blacklisted(&mut self, v: bool) {
362 self.is_blacklisted = v;
363 }
364
365 pub fn get_is_unreachable(&self) -> bool {
369 self.is_unreachable
370 }
371 pub fn clear_is_unreachable(&mut self) {
372 self.is_unreachable = false;
373 }
374
375 pub fn set_is_unreachable(&mut self, v: bool) {
377 self.is_unreachable = v;
378 }
379
380 pub fn get_inactive_for(&self) -> &::protobuf::well_known_types::Duration {
384 self.inactive_for.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::Duration::default_instance())
385 }
386 pub fn clear_inactive_for(&mut self) {
387 self.inactive_for.clear();
388 }
389
390 pub fn has_inactive_for(&self) -> bool {
391 self.inactive_for.is_some()
392 }
393
394 pub fn set_inactive_for(&mut self, v: ::protobuf::well_known_types::Duration) {
396 self.inactive_for = ::protobuf::SingularPtrField::some(v);
397 }
398
399 pub fn mut_inactive_for(&mut self) -> &mut ::protobuf::well_known_types::Duration {
402 if self.inactive_for.is_none() {
403 self.inactive_for.set_default();
404 }
405 self.inactive_for.as_mut().unwrap()
406 }
407
408 pub fn take_inactive_for(&mut self) -> ::protobuf::well_known_types::Duration {
410 self.inactive_for.take().unwrap_or_else(|| ::protobuf::well_known_types::Duration::new())
411 }
412
413 pub fn get_last_seen(&self) -> &::protobuf::well_known_types::Timestamp {
417 self.last_seen.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::default_instance())
418 }
419 pub fn clear_last_seen(&mut self) {
420 self.last_seen.clear();
421 }
422
423 pub fn has_last_seen(&self) -> bool {
424 self.last_seen.is_some()
425 }
426
427 pub fn set_last_seen(&mut self, v: ::protobuf::well_known_types::Timestamp) {
429 self.last_seen = ::protobuf::SingularPtrField::some(v);
430 }
431
432 pub fn mut_last_seen(&mut self) -> &mut ::protobuf::well_known_types::Timestamp {
435 if self.last_seen.is_none() {
436 self.last_seen.set_default();
437 }
438 self.last_seen.as_mut().unwrap()
439 }
440
441 pub fn take_last_seen(&mut self) -> ::protobuf::well_known_types::Timestamp {
443 self.last_seen.take().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new())
444 }
445
446 pub fn get_modified(&self) -> &::protobuf::well_known_types::Timestamp {
450 self.modified.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::default_instance())
451 }
452 pub fn clear_modified(&mut self) {
453 self.modified.clear();
454 }
455
456 pub fn has_modified(&self) -> bool {
457 self.modified.is_some()
458 }
459
460 pub fn set_modified(&mut self, v: ::protobuf::well_known_types::Timestamp) {
462 self.modified = ::protobuf::SingularPtrField::some(v);
463 }
464
465 pub fn mut_modified(&mut self) -> &mut ::protobuf::well_known_types::Timestamp {
468 if self.modified.is_none() {
469 self.modified.set_default();
470 }
471 self.modified.as_mut().unwrap()
472 }
473
474 pub fn take_modified(&mut self) -> ::protobuf::well_known_types::Timestamp {
476 self.modified.take().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new())
477 }
478
479 pub fn get_created(&self) -> &::protobuf::well_known_types::Timestamp {
483 self.created.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::default_instance())
484 }
485 pub fn clear_created(&mut self) {
486 self.created.clear();
487 }
488
489 pub fn has_created(&self) -> bool {
490 self.created.is_some()
491 }
492
493 pub fn set_created(&mut self, v: ::protobuf::well_known_types::Timestamp) {
495 self.created = ::protobuf::SingularPtrField::some(v);
496 }
497
498 pub fn mut_created(&mut self) -> &mut ::protobuf::well_known_types::Timestamp {
501 if self.created.is_none() {
502 self.created.set_default();
503 }
504 self.created.as_mut().unwrap()
505 }
506
507 pub fn take_created(&mut self) -> ::protobuf::well_known_types::Timestamp {
509 self.created.take().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new())
510 }
511}
512
513impl ::protobuf::Message for PeerInfo {
514 fn is_initialized(&self) -> bool {
515 for v in &self.peer_id {
516 if !v.is_initialized() {
517 return false;
518 }
519 };
520 for v in &self.inactive_for {
521 if !v.is_initialized() {
522 return false;
523 }
524 };
525 for v in &self.last_seen {
526 if !v.is_initialized() {
527 return false;
528 }
529 };
530 for v in &self.modified {
531 if !v.is_initialized() {
532 return false;
533 }
534 };
535 for v in &self.created {
536 if !v.is_initialized() {
537 return false;
538 }
539 };
540 true
541 }
542
543 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
544 while !is.eof()? {
545 let (field_number, wire_type) = is.read_tag_unpack()?;
546 match field_number {
547 1 => {
548 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.peer_id)?;
549 },
550 2 => {
551 if wire_type != ::protobuf::wire_format::WireTypeVarint {
552 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
553 }
554 let tmp = is.read_sint32()?;
555 self.reputation = tmp;
556 },
557 3 => {
558 if wire_type != ::protobuf::wire_format::WireTypeVarint {
559 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
560 }
561 let tmp = is.read_bool()?;
562 self.is_blacklisted = tmp;
563 },
564 4 => {
565 if wire_type != ::protobuf::wire_format::WireTypeVarint {
566 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
567 }
568 let tmp = is.read_bool()?;
569 self.is_unreachable = tmp;
570 },
571 5 => {
572 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.inactive_for)?;
573 },
574 6 => {
575 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.last_seen)?;
576 },
577 7 => {
578 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.modified)?;
579 },
580 8 => {
581 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.created)?;
582 },
583 _ => {
584 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
585 },
586 };
587 }
588 ::std::result::Result::Ok(())
589 }
590
591 #[allow(unused_variables)]
593 fn compute_size(&self) -> u32 {
594 let mut my_size = 0;
595 if let Some(ref v) = self.peer_id.as_ref() {
596 let len = v.compute_size();
597 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
598 }
599 if self.reputation != 0 {
600 my_size += ::protobuf::rt::value_varint_zigzag_size(2, self.reputation);
601 }
602 if self.is_blacklisted != false {
603 my_size += 2;
604 }
605 if self.is_unreachable != false {
606 my_size += 2;
607 }
608 if let Some(ref v) = self.inactive_for.as_ref() {
609 let len = v.compute_size();
610 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
611 }
612 if let Some(ref v) = self.last_seen.as_ref() {
613 let len = v.compute_size();
614 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
615 }
616 if let Some(ref v) = self.modified.as_ref() {
617 let len = v.compute_size();
618 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
619 }
620 if let Some(ref v) = self.created.as_ref() {
621 let len = v.compute_size();
622 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
623 }
624 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
625 self.cached_size.set(my_size);
626 my_size
627 }
628
629 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
630 if let Some(ref v) = self.peer_id.as_ref() {
631 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
632 os.write_raw_varint32(v.get_cached_size())?;
633 v.write_to_with_cached_sizes(os)?;
634 }
635 if self.reputation != 0 {
636 os.write_sint32(2, self.reputation)?;
637 }
638 if self.is_blacklisted != false {
639 os.write_bool(3, self.is_blacklisted)?;
640 }
641 if self.is_unreachable != false {
642 os.write_bool(4, self.is_unreachable)?;
643 }
644 if let Some(ref v) = self.inactive_for.as_ref() {
645 os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
646 os.write_raw_varint32(v.get_cached_size())?;
647 v.write_to_with_cached_sizes(os)?;
648 }
649 if let Some(ref v) = self.last_seen.as_ref() {
650 os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?;
651 os.write_raw_varint32(v.get_cached_size())?;
652 v.write_to_with_cached_sizes(os)?;
653 }
654 if let Some(ref v) = self.modified.as_ref() {
655 os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?;
656 os.write_raw_varint32(v.get_cached_size())?;
657 v.write_to_with_cached_sizes(os)?;
658 }
659 if let Some(ref v) = self.created.as_ref() {
660 os.write_tag(8, ::protobuf::wire_format::WireTypeLengthDelimited)?;
661 os.write_raw_varint32(v.get_cached_size())?;
662 v.write_to_with_cached_sizes(os)?;
663 }
664 os.write_unknown_fields(self.get_unknown_fields())?;
665 ::std::result::Result::Ok(())
666 }
667
668 fn get_cached_size(&self) -> u32 {
669 self.cached_size.get()
670 }
671
672 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
673 &self.unknown_fields
674 }
675
676 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
677 &mut self.unknown_fields
678 }
679
680 fn as_any(&self) -> &dyn (::std::any::Any) {
681 self as &dyn (::std::any::Any)
682 }
683 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
684 self as &mut dyn (::std::any::Any)
685 }
686 fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
687 self
688 }
689
690 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
691 Self::descriptor_static()
692 }
693
694 fn new() -> PeerInfo {
695 PeerInfo::new()
696 }
697
698 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
699 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
700 lock: ::protobuf::lazy::ONCE_INIT,
701 ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
702 };
703 unsafe {
704 descriptor.get(|| {
705 let mut fields = ::std::vec::Vec::new();
706 fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<PeerId>>(
707 "peer_id",
708 |m: &PeerInfo| { &m.peer_id },
709 |m: &mut PeerInfo| { &mut m.peer_id },
710 ));
711 fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeSint32>(
712 "reputation",
713 |m: &PeerInfo| { &m.reputation },
714 |m: &mut PeerInfo| { &mut m.reputation },
715 ));
716 fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
717 "is_blacklisted",
718 |m: &PeerInfo| { &m.is_blacklisted },
719 |m: &mut PeerInfo| { &mut m.is_blacklisted },
720 ));
721 fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
722 "is_unreachable",
723 |m: &PeerInfo| { &m.is_unreachable },
724 |m: &mut PeerInfo| { &mut m.is_unreachable },
725 ));
726 fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Duration>>(
727 "inactive_for",
728 |m: &PeerInfo| { &m.inactive_for },
729 |m: &mut PeerInfo| { &mut m.inactive_for },
730 ));
731 fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Timestamp>>(
732 "last_seen",
733 |m: &PeerInfo| { &m.last_seen },
734 |m: &mut PeerInfo| { &mut m.last_seen },
735 ));
736 fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Timestamp>>(
737 "modified",
738 |m: &PeerInfo| { &m.modified },
739 |m: &mut PeerInfo| { &mut m.modified },
740 ));
741 fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Timestamp>>(
742 "created",
743 |m: &PeerInfo| { &m.created },
744 |m: &mut PeerInfo| { &mut m.created },
745 ));
746 ::protobuf::reflect::MessageDescriptor::new::<PeerInfo>(
747 "PeerInfo",
748 fields,
749 file_descriptor_proto()
750 )
751 })
752 }
753 }
754
755 fn default_instance() -> &'static PeerInfo {
756 static mut instance: ::protobuf::lazy::Lazy<PeerInfo> = ::protobuf::lazy::Lazy {
757 lock: ::protobuf::lazy::ONCE_INIT,
758 ptr: 0 as *const PeerInfo,
759 };
760 unsafe {
761 instance.get(PeerInfo::new)
762 }
763 }
764}
765
766impl ::protobuf::Clear for PeerInfo {
767 fn clear(&mut self) {
768 self.peer_id.clear();
769 self.reputation = 0;
770 self.is_blacklisted = false;
771 self.is_unreachable = false;
772 self.inactive_for.clear();
773 self.last_seen.clear();
774 self.modified.clear();
775 self.created.clear();
776 self.unknown_fields.clear();
777 }
778}
779
780impl ::std::fmt::Debug for PeerInfo {
781 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
782 ::protobuf::text_format::fmt(self, f)
783 }
784}
785
786impl ::protobuf::reflect::ProtobufValue for PeerInfo {
787 fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
788 ::protobuf::reflect::ProtobufValueRef::Message(self)
789 }
790}
791
792static file_descriptor_proto_data: &'static [u8] = b"\
793 \n\nPeer.proto\x12\x16Catalyst.Protocol.Peer\x1a\x1fgoogle/protobuf/time\
794 stamp.proto\x1a\x1egoogle/protobuf/duration.proto\"K\n\x06PeerId\x12\x0e\
795 \n\x02ip\x18\x01\x20\x01(\x0cR\x02ip\x12\x12\n\x04port\x18\x02\x20\x01(\
796 \rR\x04port\x12\x1d\n\npublic_key\x18\x03\x20\x01(\x0cR\tpublicKey\"\x96\
797 \x03\n\x08PeerInfo\x127\n\x07peer_id\x18\x01\x20\x01(\x0b2\x1e.Catalyst.\
798 Protocol.Peer.PeerIdR\x06peerId\x12\x1e\n\nreputation\x18\x02\x20\x01(\
799 \x11R\nreputation\x12%\n\x0eis_blacklisted\x18\x03\x20\x01(\x08R\risBlac\
800 klisted\x12%\n\x0eis_unreachable\x18\x04\x20\x01(\x08R\risUnreachable\
801 \x12<\n\x0cinactive_for\x18\x05\x20\x01(\x0b2\x19.google.protobuf.Durati\
802 onR\x0binactiveFor\x127\n\tlast_seen\x18\x06\x20\x01(\x0b2\x1a.google.pr\
803 otobuf.TimestampR\x08lastSeen\x126\n\x08modified\x18\x07\x20\x01(\x0b2\
804 \x1a.google.protobuf.TimestampR\x08modified\x124\n\x07created\x18\x08\
805 \x20\x01(\x0b2\x1a.google.protobuf.TimestampR\x07createdB\x02P\x01J\xe7\
806 \x12\n\x06\x12\x04\x13\0/\x01\n\xdf\x06\n\x01\x0c\x12\x03\x13\0\x122\xd4\
807 \x06*\n\x20Copyright\x20(c)\x202019\x20Catalyst\x20Network\n\n\x20This\
808 \x20file\x20is\x20part\x20of\x20Catalyst.Network.Protocol.Protobuffs\x20\
809 <https://github.com/catalyst-network/protocol-protobuffs>\n\n\x20Catalys\
810 t.Network.Protocol.Protobuffs\x20is\x20free\x20software:\x20you\x20can\
811 \x20redistribute\x20it\x20and/or\x20modify\n\x20it\x20under\x20the\x20te\
812 rms\x20of\x20the\x20GNU\x20General\x20Public\x20License\x20as\x20publish\
813 ed\x20by\n\x20the\x20Free\x20Software\x20Foundation,\x20either\x20versio\
814 n\x202\x20of\x20the\x20License,\x20or\n\x20(at\x20your\x20option)\x20any\
815 \x20later\x20version.\n\x20\n\x20Catalyst.Network.Protocol.Protobuffs\
816 \x20is\x20distributed\x20in\x20the\x20hope\x20that\x20it\x20will\x20be\
817 \x20useful,\n\x20but\x20WITHOUT\x20ANY\x20WARRANTY;\x20without\x20even\
818 \x20the\x20implied\x20warranty\x20of\n\x20MERCHANTABILITY\x20or\x20FITNE\
819 SS\x20FOR\x20A\x20PARTICULAR\x20PURPOSE.\x20See\x20the\n\x20GNU\x20Gener\
820 al\x20Public\x20License\x20for\x20more\x20details.\n\x20\n\x20You\x20sho\
821 uld\x20have\x20received\x20a\x20copy\x20of\x20the\x20GNU\x20General\x20P\
822 ublic\x20License\n\x20along\x20with\x20Catalyst.Network.Protocol.Protobu\
823 ffs\x20If\x20not,\x20see\x20<https://www.gnu.org/licenses/>.\n\n\x08\n\
824 \x01\x08\x12\x03\x15\0\"\n\x0b\n\x04\x08\xe7\x07\0\x12\x03\x15\0\"\n\x0c\
825 \n\x05\x08\xe7\x07\0\x02\x12\x03\x15\x07\x1a\n\r\n\x06\x08\xe7\x07\0\x02\
826 \0\x12\x03\x15\x07\x1a\n\x0e\n\x07\x08\xe7\x07\0\x02\0\x01\x12\x03\x15\
827 \x07\x1a\n\x0c\n\x05\x08\xe7\x07\0\x03\x12\x03\x15\x1d!\n\x08\n\x01\x02\
828 \x12\x03\x17\x08\x1e\n\t\n\x02\x03\0\x12\x03\x19\x07(\n\t\n\x02\x03\x01\
829 \x12\x03\x1a\x07'\n\xaf\x01\n\x02\x04\0\x12\x04\x20\0$\x01\x1a\xa2\x01*\
830 \n\x20Aggregated\x20size\x20of\x20the\x20fields\x20in\x20PeerId\x20shoul\
831 d\x20be\x2042\x20bytes\x20as\x20specified\x20in\n\x20https://github.com/\
832 catalyst-network/protocol-blueprint/blob/master/PeerProtocol.md\n\n\n\n\
833 \x03\x04\0\x01\x12\x03\x20\x08\x0e\n\x17\n\x04\x04\0\x02\0\x12\x03!\x04\
834 \x11\"\n\x2016\x20bytes\n\n\r\n\x05\x04\0\x02\0\x04\x12\x04!\x04\x20\x10\
835 \n\x0c\n\x05\x04\0\x02\0\x05\x12\x03!\x04\t\n\x0c\n\x05\x04\0\x02\0\x01\
836 \x12\x03!\n\x0c\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03!\x0f\x10\n\x16\n\x04\
837 \x04\0\x02\x01\x12\x03\"\x04\x14\"\t\x202\x20bytes\n\n\r\n\x05\x04\0\x02\
838 \x01\x04\x12\x04\"\x04!\x11\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\"\x04\
839 \n\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\"\x0b\x0f\n\x0c\n\x05\x04\0\x02\
840 \x01\x03\x12\x03\"\x12\x13\nr\n\x04\x04\0\x02\x02\x12\x03#\x04\x19\"e\
841 \x20Peers\x20public\x20key,\x20node\x20operators\x20are\x20encouraged\
842 \x20to\x20use\x20the\x20same,\x20public\x20key\x20across\x20all\x20their\
843 \x20nodes.\n\n\r\n\x05\x04\0\x02\x02\x04\x12\x04#\x04\"\x14\n\x0c\n\x05\
844 \x04\0\x02\x02\x05\x12\x03#\x04\t\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03#\
845 \n\x14\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03#\x17\x18\n\n\n\x02\x04\x01\
846 \x12\x04&\0/\x01\n\n\n\x03\x04\x01\x01\x12\x03&\x08\x10\n#\n\x04\x04\x01\
847 \x02\0\x12\x03'\x04\x17\"\x16\x20is\x20peerId\x20of\x20network\n\n\r\n\
848 \x05\x04\x01\x02\0\x04\x12\x04'\x04&\x12\n\x0c\n\x05\x04\x01\x02\0\x06\
849 \x12\x03'\x04\n\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03'\x0b\x12\n\x0c\n\
850 \x05\x04\x01\x02\0\x03\x12\x03'\x15\x16\n!\n\x04\x04\x01\x02\x01\x12\x03\
851 (\x04\x1a\"\x14\x20reputation\x20of\x20peer\n\n\r\n\x05\x04\x01\x02\x01\
852 \x04\x12\x04(\x04'\x17\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03(\x04\n\n\
853 \x0c\n\x05\x04\x01\x02\x01\x01\x12\x03(\x0b\x15\n\x0c\n\x05\x04\x01\x02\
854 \x01\x03\x12\x03(\x18\x19\n5\n\x04\x04\x01\x02\x02\x12\x03)\x04\x1c\"(\
855 \x20is\x20to\x20check\x20if\x20the\x20peer\x20is\x20blackListed\n\n\r\n\
856 \x05\x04\x01\x02\x02\x04\x12\x04)\x04(\x1a\n\x0c\n\x05\x04\x01\x02\x02\
857 \x05\x12\x03)\x04\x08\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\x03)\t\x17\n\
858 \x0c\n\x05\x04\x01\x02\x02\x03\x12\x03)\x1a\x1b\n@\n\x04\x04\x01\x02\x03\
859 \x12\x03*\x04\x1c\"3\x20is\x20when\x20the\x20peer\x20cannot\x20be\x20rea\
860 ched\x20on\x20the\x20network\n\n\r\n\x05\x04\x01\x02\x03\x04\x12\x04*\
861 \x04)\x1c\n\x0c\n\x05\x04\x01\x02\x03\x05\x12\x03*\x04\x08\n\x0c\n\x05\
862 \x04\x01\x02\x03\x01\x12\x03*\t\x17\n\x0c\n\x05\x04\x01\x02\x03\x03\x12\
863 \x03*\x1a\x1b\n:\n\x04\x04\x01\x02\x04\x12\x03+\x04.\"-\x20is\x20how\x20\
864 long\x20the\x20peer\x20has\x20beekn\x20inactive\x20for\n\n\r\n\x05\x04\
865 \x01\x02\x04\x04\x12\x04+\x04*\x1c\n\x0c\n\x05\x04\x01\x02\x04\x06\x12\
866 \x03+\x04\x1c\n\x0c\n\x05\x04\x01\x02\x04\x01\x12\x03+\x1d)\n\x0c\n\x05\
867 \x04\x01\x02\x04\x03\x12\x03+,-\n-\n\x04\x04\x01\x02\x05\x12\x03,\x04,\"\
868 \x20\x20is\x20when\x20the\x20peer\x20was\x20last\x20seen\n\n\r\n\x05\x04\
869 \x01\x02\x05\x04\x12\x04,\x04+.\n\x0c\n\x05\x04\x01\x02\x05\x06\x12\x03,\
870 \x04\x1d\n\x0c\n\x05\x04\x01\x02\x05\x01\x12\x03,\x1e'\n\x0c\n\x05\x04\
871 \x01\x02\x05\x03\x12\x03,*+\n:\n\x04\x04\x01\x02\x06\x12\x03-\x04+\"-\
872 \x20modified\x20is\x20when\x20the\x20peer\x20was\x20last\x20modified\n\n\
873 \r\n\x05\x04\x01\x02\x06\x04\x12\x04-\x04,,\n\x0c\n\x05\x04\x01\x02\x06\
874 \x06\x12\x03-\x04\x1d\n\x0c\n\x05\x04\x01\x02\x06\x01\x12\x03-\x1e&\n\
875 \x0c\n\x05\x04\x01\x02\x06\x03\x12\x03-)*\n3\n\x04\x04\x01\x02\x07\x12\
876 \x03.\x04*\"&\x20created\x20is\x20when\x20the\x20peer\x20was\x20created\
877 \n\n\r\n\x05\x04\x01\x02\x07\x04\x12\x04.\x04-+\n\x0c\n\x05\x04\x01\x02\
878 \x07\x06\x12\x03.\x04\x1d\n\x0c\n\x05\x04\x01\x02\x07\x01\x12\x03.\x1e%\
879 \n\x0c\n\x05\x04\x01\x02\x07\x03\x12\x03.()b\x06proto3\
880";
881
882static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
883 lock: ::protobuf::lazy::ONCE_INIT,
884 ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
885};
886
887fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
888 ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
889}
890
891pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
892 unsafe {
893 file_descriptor_proto_lazy.get(|| {
894 parse_descriptor_proto()
895 })
896 }
897}