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 BlockChallengeRequest {
31 pub challenge_salt: ::std::string::String,
33 pub main_file_cid: ::std::string::String,
34 pub block_idx_random_guid: ::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 BlockChallengeRequest {
41 fn default() -> &'a BlockChallengeRequest {
42 <BlockChallengeRequest as ::protobuf::Message>::default_instance()
43 }
44}
45
46impl BlockChallengeRequest {
47 pub fn new() -> BlockChallengeRequest {
48 ::std::default::Default::default()
49 }
50
51 pub fn get_challenge_salt(&self) -> &str {
55 &self.challenge_salt
56 }
57 pub fn clear_challenge_salt(&mut self) {
58 self.challenge_salt.clear();
59 }
60
61 pub fn set_challenge_salt(&mut self, v: ::std::string::String) {
63 self.challenge_salt = v;
64 }
65
66 pub fn mut_challenge_salt(&mut self) -> &mut ::std::string::String {
69 &mut self.challenge_salt
70 }
71
72 pub fn take_challenge_salt(&mut self) -> ::std::string::String {
74 ::std::mem::replace(&mut self.challenge_salt, ::std::string::String::new())
75 }
76
77 pub fn get_main_file_cid(&self) -> &str {
81 &self.main_file_cid
82 }
83 pub fn clear_main_file_cid(&mut self) {
84 self.main_file_cid.clear();
85 }
86
87 pub fn set_main_file_cid(&mut self, v: ::std::string::String) {
89 self.main_file_cid = v;
90 }
91
92 pub fn mut_main_file_cid(&mut self) -> &mut ::std::string::String {
95 &mut self.main_file_cid
96 }
97
98 pub fn take_main_file_cid(&mut self) -> ::std::string::String {
100 ::std::mem::replace(&mut self.main_file_cid, ::std::string::String::new())
101 }
102
103 pub fn get_block_idx_random_guid(&self) -> &[u8] {
107 &self.block_idx_random_guid
108 }
109 pub fn clear_block_idx_random_guid(&mut self) {
110 self.block_idx_random_guid.clear();
111 }
112
113 pub fn set_block_idx_random_guid(&mut self, v: ::std::vec::Vec<u8>) {
115 self.block_idx_random_guid = v;
116 }
117
118 pub fn mut_block_idx_random_guid(&mut self) -> &mut ::std::vec::Vec<u8> {
121 &mut self.block_idx_random_guid
122 }
123
124 pub fn take_block_idx_random_guid(&mut self) -> ::std::vec::Vec<u8> {
126 ::std::mem::replace(&mut self.block_idx_random_guid, ::std::vec::Vec::new())
127 }
128}
129
130impl ::protobuf::Message for BlockChallengeRequest {
131 fn is_initialized(&self) -> bool {
132 true
133 }
134
135 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
136 while !is.eof()? {
137 let (field_number, wire_type) = is.read_tag_unpack()?;
138 match field_number {
139 1 => {
140 ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.challenge_salt)?;
141 },
142 2 => {
143 ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.main_file_cid)?;
144 },
145 3 => {
146 ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.block_idx_random_guid)?;
147 },
148 _ => {
149 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
150 },
151 };
152 }
153 ::std::result::Result::Ok(())
154 }
155
156 #[allow(unused_variables)]
158 fn compute_size(&self) -> u32 {
159 let mut my_size = 0;
160 if !self.challenge_salt.is_empty() {
161 my_size += ::protobuf::rt::string_size(1, &self.challenge_salt);
162 }
163 if !self.main_file_cid.is_empty() {
164 my_size += ::protobuf::rt::string_size(2, &self.main_file_cid);
165 }
166 if !self.block_idx_random_guid.is_empty() {
167 my_size += ::protobuf::rt::bytes_size(3, &self.block_idx_random_guid);
168 }
169 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
170 self.cached_size.set(my_size);
171 my_size
172 }
173
174 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
175 if !self.challenge_salt.is_empty() {
176 os.write_string(1, &self.challenge_salt)?;
177 }
178 if !self.main_file_cid.is_empty() {
179 os.write_string(2, &self.main_file_cid)?;
180 }
181 if !self.block_idx_random_guid.is_empty() {
182 os.write_bytes(3, &self.block_idx_random_guid)?;
183 }
184 os.write_unknown_fields(self.get_unknown_fields())?;
185 ::std::result::Result::Ok(())
186 }
187
188 fn get_cached_size(&self) -> u32 {
189 self.cached_size.get()
190 }
191
192 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
193 &self.unknown_fields
194 }
195
196 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
197 &mut self.unknown_fields
198 }
199
200 fn as_any(&self) -> &dyn (::std::any::Any) {
201 self as &dyn (::std::any::Any)
202 }
203 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
204 self as &mut dyn (::std::any::Any)
205 }
206 fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
207 self
208 }
209
210 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
211 Self::descriptor_static()
212 }
213
214 fn new() -> BlockChallengeRequest {
215 BlockChallengeRequest::new()
216 }
217
218 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
219 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
220 lock: ::protobuf::lazy::ONCE_INIT,
221 ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
222 };
223 unsafe {
224 descriptor.get(|| {
225 let mut fields = ::std::vec::Vec::new();
226 fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
227 "challenge_salt",
228 |m: &BlockChallengeRequest| { &m.challenge_salt },
229 |m: &mut BlockChallengeRequest| { &mut m.challenge_salt },
230 ));
231 fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
232 "main_file_cid",
233 |m: &BlockChallengeRequest| { &m.main_file_cid },
234 |m: &mut BlockChallengeRequest| { &mut m.main_file_cid },
235 ));
236 fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
237 "block_idx_random_guid",
238 |m: &BlockChallengeRequest| { &m.block_idx_random_guid },
239 |m: &mut BlockChallengeRequest| { &mut m.block_idx_random_guid },
240 ));
241 ::protobuf::reflect::MessageDescriptor::new::<BlockChallengeRequest>(
242 "BlockChallengeRequest",
243 fields,
244 file_descriptor_proto()
245 )
246 })
247 }
248 }
249
250 fn default_instance() -> &'static BlockChallengeRequest {
251 static mut instance: ::protobuf::lazy::Lazy<BlockChallengeRequest> = ::protobuf::lazy::Lazy {
252 lock: ::protobuf::lazy::ONCE_INIT,
253 ptr: 0 as *const BlockChallengeRequest,
254 };
255 unsafe {
256 instance.get(BlockChallengeRequest::new)
257 }
258 }
259}
260
261impl ::protobuf::Clear for BlockChallengeRequest {
262 fn clear(&mut self) {
263 self.challenge_salt.clear();
264 self.main_file_cid.clear();
265 self.block_idx_random_guid.clear();
266 self.unknown_fields.clear();
267 }
268}
269
270impl ::std::fmt::Debug for BlockChallengeRequest {
271 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
272 ::protobuf::text_format::fmt(self, f)
273 }
274}
275
276impl ::protobuf::reflect::ProtobufValue for BlockChallengeRequest {
277 fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
278 ::protobuf::reflect::ProtobufValueRef::Message(self)
279 }
280}
281
282#[derive(PartialEq,Clone,Default)]
283pub struct BlockChallengeResponse {
284 pub answer: ::std::string::String,
286 pub block_challenge_request_hash: ::std::string::String,
287 pub unknown_fields: ::protobuf::UnknownFields,
289 pub cached_size: ::protobuf::CachedSize,
290}
291
292impl<'a> ::std::default::Default for &'a BlockChallengeResponse {
293 fn default() -> &'a BlockChallengeResponse {
294 <BlockChallengeResponse as ::protobuf::Message>::default_instance()
295 }
296}
297
298impl BlockChallengeResponse {
299 pub fn new() -> BlockChallengeResponse {
300 ::std::default::Default::default()
301 }
302
303 pub fn get_answer(&self) -> &str {
307 &self.answer
308 }
309 pub fn clear_answer(&mut self) {
310 self.answer.clear();
311 }
312
313 pub fn set_answer(&mut self, v: ::std::string::String) {
315 self.answer = v;
316 }
317
318 pub fn mut_answer(&mut self) -> &mut ::std::string::String {
321 &mut self.answer
322 }
323
324 pub fn take_answer(&mut self) -> ::std::string::String {
326 ::std::mem::replace(&mut self.answer, ::std::string::String::new())
327 }
328
329 pub fn get_block_challenge_request_hash(&self) -> &str {
333 &self.block_challenge_request_hash
334 }
335 pub fn clear_block_challenge_request_hash(&mut self) {
336 self.block_challenge_request_hash.clear();
337 }
338
339 pub fn set_block_challenge_request_hash(&mut self, v: ::std::string::String) {
341 self.block_challenge_request_hash = v;
342 }
343
344 pub fn mut_block_challenge_request_hash(&mut self) -> &mut ::std::string::String {
347 &mut self.block_challenge_request_hash
348 }
349
350 pub fn take_block_challenge_request_hash(&mut self) -> ::std::string::String {
352 ::std::mem::replace(&mut self.block_challenge_request_hash, ::std::string::String::new())
353 }
354}
355
356impl ::protobuf::Message for BlockChallengeResponse {
357 fn is_initialized(&self) -> bool {
358 true
359 }
360
361 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
362 while !is.eof()? {
363 let (field_number, wire_type) = is.read_tag_unpack()?;
364 match field_number {
365 1 => {
366 ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.answer)?;
367 },
368 2 => {
369 ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.block_challenge_request_hash)?;
370 },
371 _ => {
372 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
373 },
374 };
375 }
376 ::std::result::Result::Ok(())
377 }
378
379 #[allow(unused_variables)]
381 fn compute_size(&self) -> u32 {
382 let mut my_size = 0;
383 if !self.answer.is_empty() {
384 my_size += ::protobuf::rt::string_size(1, &self.answer);
385 }
386 if !self.block_challenge_request_hash.is_empty() {
387 my_size += ::protobuf::rt::string_size(2, &self.block_challenge_request_hash);
388 }
389 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
390 self.cached_size.set(my_size);
391 my_size
392 }
393
394 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
395 if !self.answer.is_empty() {
396 os.write_string(1, &self.answer)?;
397 }
398 if !self.block_challenge_request_hash.is_empty() {
399 os.write_string(2, &self.block_challenge_request_hash)?;
400 }
401 os.write_unknown_fields(self.get_unknown_fields())?;
402 ::std::result::Result::Ok(())
403 }
404
405 fn get_cached_size(&self) -> u32 {
406 self.cached_size.get()
407 }
408
409 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
410 &self.unknown_fields
411 }
412
413 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
414 &mut self.unknown_fields
415 }
416
417 fn as_any(&self) -> &dyn (::std::any::Any) {
418 self as &dyn (::std::any::Any)
419 }
420 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
421 self as &mut dyn (::std::any::Any)
422 }
423 fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
424 self
425 }
426
427 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
428 Self::descriptor_static()
429 }
430
431 fn new() -> BlockChallengeResponse {
432 BlockChallengeResponse::new()
433 }
434
435 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
436 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
437 lock: ::protobuf::lazy::ONCE_INIT,
438 ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
439 };
440 unsafe {
441 descriptor.get(|| {
442 let mut fields = ::std::vec::Vec::new();
443 fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
444 "answer",
445 |m: &BlockChallengeResponse| { &m.answer },
446 |m: &mut BlockChallengeResponse| { &mut m.answer },
447 ));
448 fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
449 "block_challenge_request_hash",
450 |m: &BlockChallengeResponse| { &m.block_challenge_request_hash },
451 |m: &mut BlockChallengeResponse| { &mut m.block_challenge_request_hash },
452 ));
453 ::protobuf::reflect::MessageDescriptor::new::<BlockChallengeResponse>(
454 "BlockChallengeResponse",
455 fields,
456 file_descriptor_proto()
457 )
458 })
459 }
460 }
461
462 fn default_instance() -> &'static BlockChallengeResponse {
463 static mut instance: ::protobuf::lazy::Lazy<BlockChallengeResponse> = ::protobuf::lazy::Lazy {
464 lock: ::protobuf::lazy::ONCE_INIT,
465 ptr: 0 as *const BlockChallengeResponse,
466 };
467 unsafe {
468 instance.get(BlockChallengeResponse::new)
469 }
470 }
471}
472
473impl ::protobuf::Clear for BlockChallengeResponse {
474 fn clear(&mut self) {
475 self.answer.clear();
476 self.block_challenge_request_hash.clear();
477 self.unknown_fields.clear();
478 }
479}
480
481impl ::std::fmt::Debug for BlockChallengeResponse {
482 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
483 ::protobuf::text_format::fmt(self, f)
484 }
485}
486
487impl ::protobuf::reflect::ProtobufValue for BlockChallengeResponse {
488 fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
489 ::protobuf::reflect::ProtobufValueRef::Message(self)
490 }
491}
492
493#[derive(PartialEq,Clone,Default)]
494pub struct BlockChallengeBroadcast {
495 pub original_challenge: ::protobuf::SingularPtrField<BlockChallengeRequest>,
497 pub answer: ::std::string::String,
498 pub challenged_peer: ::protobuf::SingularPtrField<super::Peer::PeerId>,
499 pub challenged_by: ::protobuf::SingularPtrField<super::Peer::PeerId>,
500 pub unknown_fields: ::protobuf::UnknownFields,
502 pub cached_size: ::protobuf::CachedSize,
503}
504
505impl<'a> ::std::default::Default for &'a BlockChallengeBroadcast {
506 fn default() -> &'a BlockChallengeBroadcast {
507 <BlockChallengeBroadcast as ::protobuf::Message>::default_instance()
508 }
509}
510
511impl BlockChallengeBroadcast {
512 pub fn new() -> BlockChallengeBroadcast {
513 ::std::default::Default::default()
514 }
515
516 pub fn get_original_challenge(&self) -> &BlockChallengeRequest {
520 self.original_challenge.as_ref().unwrap_or_else(|| BlockChallengeRequest::default_instance())
521 }
522 pub fn clear_original_challenge(&mut self) {
523 self.original_challenge.clear();
524 }
525
526 pub fn has_original_challenge(&self) -> bool {
527 self.original_challenge.is_some()
528 }
529
530 pub fn set_original_challenge(&mut self, v: BlockChallengeRequest) {
532 self.original_challenge = ::protobuf::SingularPtrField::some(v);
533 }
534
535 pub fn mut_original_challenge(&mut self) -> &mut BlockChallengeRequest {
538 if self.original_challenge.is_none() {
539 self.original_challenge.set_default();
540 }
541 self.original_challenge.as_mut().unwrap()
542 }
543
544 pub fn take_original_challenge(&mut self) -> BlockChallengeRequest {
546 self.original_challenge.take().unwrap_or_else(|| BlockChallengeRequest::new())
547 }
548
549 pub fn get_answer(&self) -> &str {
553 &self.answer
554 }
555 pub fn clear_answer(&mut self) {
556 self.answer.clear();
557 }
558
559 pub fn set_answer(&mut self, v: ::std::string::String) {
561 self.answer = v;
562 }
563
564 pub fn mut_answer(&mut self) -> &mut ::std::string::String {
567 &mut self.answer
568 }
569
570 pub fn take_answer(&mut self) -> ::std::string::String {
572 ::std::mem::replace(&mut self.answer, ::std::string::String::new())
573 }
574
575 pub fn get_challenged_peer(&self) -> &super::Peer::PeerId {
579 self.challenged_peer.as_ref().unwrap_or_else(|| super::Peer::PeerId::default_instance())
580 }
581 pub fn clear_challenged_peer(&mut self) {
582 self.challenged_peer.clear();
583 }
584
585 pub fn has_challenged_peer(&self) -> bool {
586 self.challenged_peer.is_some()
587 }
588
589 pub fn set_challenged_peer(&mut self, v: super::Peer::PeerId) {
591 self.challenged_peer = ::protobuf::SingularPtrField::some(v);
592 }
593
594 pub fn mut_challenged_peer(&mut self) -> &mut super::Peer::PeerId {
597 if self.challenged_peer.is_none() {
598 self.challenged_peer.set_default();
599 }
600 self.challenged_peer.as_mut().unwrap()
601 }
602
603 pub fn take_challenged_peer(&mut self) -> super::Peer::PeerId {
605 self.challenged_peer.take().unwrap_or_else(|| super::Peer::PeerId::new())
606 }
607
608 pub fn get_challenged_by(&self) -> &super::Peer::PeerId {
612 self.challenged_by.as_ref().unwrap_or_else(|| super::Peer::PeerId::default_instance())
613 }
614 pub fn clear_challenged_by(&mut self) {
615 self.challenged_by.clear();
616 }
617
618 pub fn has_challenged_by(&self) -> bool {
619 self.challenged_by.is_some()
620 }
621
622 pub fn set_challenged_by(&mut self, v: super::Peer::PeerId) {
624 self.challenged_by = ::protobuf::SingularPtrField::some(v);
625 }
626
627 pub fn mut_challenged_by(&mut self) -> &mut super::Peer::PeerId {
630 if self.challenged_by.is_none() {
631 self.challenged_by.set_default();
632 }
633 self.challenged_by.as_mut().unwrap()
634 }
635
636 pub fn take_challenged_by(&mut self) -> super::Peer::PeerId {
638 self.challenged_by.take().unwrap_or_else(|| super::Peer::PeerId::new())
639 }
640}
641
642impl ::protobuf::Message for BlockChallengeBroadcast {
643 fn is_initialized(&self) -> bool {
644 for v in &self.original_challenge {
645 if !v.is_initialized() {
646 return false;
647 }
648 };
649 for v in &self.challenged_peer {
650 if !v.is_initialized() {
651 return false;
652 }
653 };
654 for v in &self.challenged_by {
655 if !v.is_initialized() {
656 return false;
657 }
658 };
659 true
660 }
661
662 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
663 while !is.eof()? {
664 let (field_number, wire_type) = is.read_tag_unpack()?;
665 match field_number {
666 1 => {
667 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.original_challenge)?;
668 },
669 2 => {
670 ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.answer)?;
671 },
672 3 => {
673 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.challenged_peer)?;
674 },
675 4 => {
676 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.challenged_by)?;
677 },
678 _ => {
679 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
680 },
681 };
682 }
683 ::std::result::Result::Ok(())
684 }
685
686 #[allow(unused_variables)]
688 fn compute_size(&self) -> u32 {
689 let mut my_size = 0;
690 if let Some(ref v) = self.original_challenge.as_ref() {
691 let len = v.compute_size();
692 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
693 }
694 if !self.answer.is_empty() {
695 my_size += ::protobuf::rt::string_size(2, &self.answer);
696 }
697 if let Some(ref v) = self.challenged_peer.as_ref() {
698 let len = v.compute_size();
699 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
700 }
701 if let Some(ref v) = self.challenged_by.as_ref() {
702 let len = v.compute_size();
703 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
704 }
705 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
706 self.cached_size.set(my_size);
707 my_size
708 }
709
710 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
711 if let Some(ref v) = self.original_challenge.as_ref() {
712 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
713 os.write_raw_varint32(v.get_cached_size())?;
714 v.write_to_with_cached_sizes(os)?;
715 }
716 if !self.answer.is_empty() {
717 os.write_string(2, &self.answer)?;
718 }
719 if let Some(ref v) = self.challenged_peer.as_ref() {
720 os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
721 os.write_raw_varint32(v.get_cached_size())?;
722 v.write_to_with_cached_sizes(os)?;
723 }
724 if let Some(ref v) = self.challenged_by.as_ref() {
725 os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
726 os.write_raw_varint32(v.get_cached_size())?;
727 v.write_to_with_cached_sizes(os)?;
728 }
729 os.write_unknown_fields(self.get_unknown_fields())?;
730 ::std::result::Result::Ok(())
731 }
732
733 fn get_cached_size(&self) -> u32 {
734 self.cached_size.get()
735 }
736
737 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
738 &self.unknown_fields
739 }
740
741 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
742 &mut self.unknown_fields
743 }
744
745 fn as_any(&self) -> &dyn (::std::any::Any) {
746 self as &dyn (::std::any::Any)
747 }
748 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
749 self as &mut dyn (::std::any::Any)
750 }
751 fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
752 self
753 }
754
755 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
756 Self::descriptor_static()
757 }
758
759 fn new() -> BlockChallengeBroadcast {
760 BlockChallengeBroadcast::new()
761 }
762
763 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
764 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
765 lock: ::protobuf::lazy::ONCE_INIT,
766 ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
767 };
768 unsafe {
769 descriptor.get(|| {
770 let mut fields = ::std::vec::Vec::new();
771 fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<BlockChallengeRequest>>(
772 "original_challenge",
773 |m: &BlockChallengeBroadcast| { &m.original_challenge },
774 |m: &mut BlockChallengeBroadcast| { &mut m.original_challenge },
775 ));
776 fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
777 "answer",
778 |m: &BlockChallengeBroadcast| { &m.answer },
779 |m: &mut BlockChallengeBroadcast| { &mut m.answer },
780 ));
781 fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::Peer::PeerId>>(
782 "challenged_peer",
783 |m: &BlockChallengeBroadcast| { &m.challenged_peer },
784 |m: &mut BlockChallengeBroadcast| { &mut m.challenged_peer },
785 ));
786 fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::Peer::PeerId>>(
787 "challenged_by",
788 |m: &BlockChallengeBroadcast| { &m.challenged_by },
789 |m: &mut BlockChallengeBroadcast| { &mut m.challenged_by },
790 ));
791 ::protobuf::reflect::MessageDescriptor::new::<BlockChallengeBroadcast>(
792 "BlockChallengeBroadcast",
793 fields,
794 file_descriptor_proto()
795 )
796 })
797 }
798 }
799
800 fn default_instance() -> &'static BlockChallengeBroadcast {
801 static mut instance: ::protobuf::lazy::Lazy<BlockChallengeBroadcast> = ::protobuf::lazy::Lazy {
802 lock: ::protobuf::lazy::ONCE_INIT,
803 ptr: 0 as *const BlockChallengeBroadcast,
804 };
805 unsafe {
806 instance.get(BlockChallengeBroadcast::new)
807 }
808 }
809}
810
811impl ::protobuf::Clear for BlockChallengeBroadcast {
812 fn clear(&mut self) {
813 self.original_challenge.clear();
814 self.answer.clear();
815 self.challenged_peer.clear();
816 self.challenged_by.clear();
817 self.unknown_fields.clear();
818 }
819}
820
821impl ::std::fmt::Debug for BlockChallengeBroadcast {
822 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
823 ::protobuf::text_format::fmt(self, f)
824 }
825}
826
827impl ::protobuf::reflect::ProtobufValue for BlockChallengeBroadcast {
828 fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
829 ::protobuf::reflect::ProtobufValueRef::Message(self)
830 }
831}
832
833static file_descriptor_proto_data: &'static [u8] = b"\
834 \n\x14DfsMarketplace.proto\x12\x20Catalyst.Protocol.DfsMarketplace\x1a\n\
835 Peer.proto\"\x95\x01\n\x15BlockChallengeRequest\x12%\n\x0echallenge_salt\
836 \x18\x01\x20\x01(\tR\rchallengeSalt\x12\"\n\rmain_file_cid\x18\x02\x20\
837 \x01(\tR\x0bmainFileCid\x121\n\x15block_idx_random_guid\x18\x03\x20\x01(\
838 \x0cR\x12blockIdxRandomGuid\"q\n\x16BlockChallengeResponse\x12\x16\n\x06\
839 answer\x18\x01\x20\x01(\tR\x06answer\x12?\n\x1cblock_challenge_request_h\
840 ash\x18\x02\x20\x01(\tR\x19blockChallengeRequestHash\"\xa7\x02\n\x17Bloc\
841 kChallengeBroadcast\x12f\n\x12original_challenge\x18\x01\x20\x01(\x0b27.\
842 Catalyst.Protocol.DfsMarketplace.BlockChallengeRequestR\x11originalChall\
843 enge\x12\x16\n\x06answer\x18\x02\x20\x01(\tR\x06answer\x12G\n\x0fchallen\
844 ged_peer\x18\x03\x20\x01(\x0b2\x1e.Catalyst.Protocol.Peer.PeerIdR\x0echa\
845 llengedPeer\x12C\n\rchallenged_by\x18\x04\x20\x01(\x0b2\x1e.Catalyst.Pro\
846 tocol.Peer.PeerIdR\x0cchallengedByB\x02P\x01J\x8f\r\n\x06\x12\x04\x13\0+\
847 \x01\n\xdf\x06\n\x01\x0c\x12\x03\x13\0\x122\xd4\x06*\n\x20Copyright\x20(\
848 c)\x202019\x20Catalyst\x20Network\n\n\x20This\x20file\x20is\x20part\x20o\
849 f\x20Catalyst.Network.Protocol.Protobuffs\x20<https://github.com/catalys\
850 t-network/protocol-protobuffs>\n\n\x20Catalyst.Network.Protocol.Protobuf\
851 fs\x20is\x20free\x20software:\x20you\x20can\x20redistribute\x20it\x20and\
852 /or\x20modify\n\x20it\x20under\x20the\x20terms\x20of\x20the\x20GNU\x20Ge\
853 neral\x20Public\x20License\x20as\x20published\x20by\n\x20the\x20Free\x20\
854 Software\x20Foundation,\x20either\x20version\x202\x20of\x20the\x20Licens\
855 e,\x20or\n\x20(at\x20your\x20option)\x20any\x20later\x20version.\n\x20\n\
856 \x20Catalyst.Network.Protocol.Protobuffs\x20is\x20distributed\x20in\x20t\
857 he\x20hope\x20that\x20it\x20will\x20be\x20useful,\n\x20but\x20WITHOUT\
858 \x20ANY\x20WARRANTY;\x20without\x20even\x20the\x20implied\x20warranty\
859 \x20of\n\x20MERCHANTABILITY\x20or\x20FITNESS\x20FOR\x20A\x20PARTICULAR\
860 \x20PURPOSE.\x20See\x20the\n\x20GNU\x20General\x20Public\x20License\x20f\
861 or\x20more\x20details.\n\x20\n\x20You\x20should\x20have\x20received\x20a\
862 \x20copy\x20of\x20the\x20GNU\x20General\x20Public\x20License\n\x20along\
863 \x20with\x20Catalyst.Network.Protocol.Protobuffs\x20If\x20not,\x20see\
864 \x20<https://www.gnu.org/licenses/>.\n\n\x08\n\x01\x08\x12\x03\x15\0\"\n\
865 \x0b\n\x04\x08\xe7\x07\0\x12\x03\x15\0\"\n\x0c\n\x05\x08\xe7\x07\0\x02\
866 \x12\x03\x15\x07\x1a\n\r\n\x06\x08\xe7\x07\0\x02\0\x12\x03\x15\x07\x1a\n\
867 \x0e\n\x07\x08\xe7\x07\0\x02\0\x01\x12\x03\x15\x07\x1a\n\x0c\n\x05\x08\
868 \xe7\x07\0\x03\x12\x03\x15\x1d!\n\x08\n\x01\x02\x12\x03\x17\x08(\n\t\n\
869 \x02\x03\0\x12\x03\x19\x07\x13\n\n\n\x02\x04\0\x12\x04\x1b\0\x1f\x01\n\n\
870 \n\x03\x04\0\x01\x12\x03\x1b\x08\x1d\n\x0b\n\x04\x04\0\x02\0\x12\x03\x1c\
871 \x08\"\n\r\n\x05\x04\0\x02\0\x04\x12\x04\x1c\x08\x1b\x1f\n\x0c\n\x05\x04\
872 \0\x02\0\x05\x12\x03\x1c\x08\x0e\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x1c\
873 \x0f\x1d\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x1c\x20!\n\x0b\n\x04\x04\0\
874 \x02\x01\x12\x03\x1d\x08!\n\r\n\x05\x04\0\x02\x01\x04\x12\x04\x1d\x08\
875 \x1c\"\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x1d\x08\x0e\n\x0c\n\x05\x04\
876 \0\x02\x01\x01\x12\x03\x1d\x0f\x1c\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\
877 \x1d\x1f\x20\n\x0b\n\x04\x04\0\x02\x02\x12\x03\x1e\x08(\n\r\n\x05\x04\0\
878 \x02\x02\x04\x12\x04\x1e\x08\x1d!\n\x0c\n\x05\x04\0\x02\x02\x05\x12\x03\
879 \x1e\x08\r\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03\x1e\x0e#\n\x0c\n\x05\
880 \x04\0\x02\x02\x03\x12\x03\x1e&'\n\n\n\x02\x04\x01\x12\x04!\0$\x01\n\n\n\
881 \x03\x04\x01\x01\x12\x03!\x08\x1e\n\x0b\n\x04\x04\x01\x02\0\x12\x03\"\
882 \x08\x1a\n\r\n\x05\x04\x01\x02\0\x04\x12\x04\"\x08!\x20\n\x0c\n\x05\x04\
883 \x01\x02\0\x05\x12\x03\"\x08\x0e\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\"\
884 \x0f\x15\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\"\x18\x19\n\x0b\n\x04\x04\
885 \x01\x02\x01\x12\x03#\x080\n\r\n\x05\x04\x01\x02\x01\x04\x12\x04#\x08\"\
886 \x1a\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03#\x08\x0e\n\x0c\n\x05\x04\
887 \x01\x02\x01\x01\x12\x03#\x0f+\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03#.\
888 /\n\n\n\x02\x04\x02\x12\x04&\0+\x01\n\n\n\x03\x04\x02\x01\x12\x03&\x08\
889 \x1f\n\x0b\n\x04\x04\x02\x02\0\x12\x03'\x085\n\r\n\x05\x04\x02\x02\0\x04\
890 \x12\x04'\x08&!\n\x0c\n\x05\x04\x02\x02\0\x06\x12\x03'\x08\x1d\n\x0c\n\
891 \x05\x04\x02\x02\0\x01\x12\x03'\x1e0\n\x0c\n\x05\x04\x02\x02\0\x03\x12\
892 \x03'34\n\x0b\n\x04\x04\x02\x02\x01\x12\x03(\x08\x1a\n\r\n\x05\x04\x02\
893 \x02\x01\x04\x12\x04(\x08'5\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\x03(\x08\
894 \x0e\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\x03(\x0f\x15\n\x0c\n\x05\x04\
895 \x02\x02\x01\x03\x12\x03(\x18\x19\n\x0b\n\x04\x04\x02\x02\x02\x12\x03)\
896 \x08(\n\r\n\x05\x04\x02\x02\x02\x04\x12\x04)\x08(\x1a\n\x0c\n\x05\x04\
897 \x02\x02\x02\x06\x12\x03)\x08\x13\n\x0c\n\x05\x04\x02\x02\x02\x01\x12\
898 \x03)\x14#\n\x0c\n\x05\x04\x02\x02\x02\x03\x12\x03)&'\n\x0b\n\x04\x04\
899 \x02\x02\x03\x12\x03*\x08&\n\r\n\x05\x04\x02\x02\x03\x04\x12\x04*\x08)(\
900 \n\x0c\n\x05\x04\x02\x02\x03\x06\x12\x03*\x08\x13\n\x0c\n\x05\x04\x02\
901 \x02\x03\x01\x12\x03*\x14!\n\x0c\n\x05\x04\x02\x02\x03\x03\x12\x03*$%b\
902 \x06proto3\
903";
904
905static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
906 lock: ::protobuf::lazy::ONCE_INIT,
907 ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
908};
909
910fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
911 ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
912}
913
914pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
915 unsafe {
916 file_descriptor_proto_lazy.get(|| {
917 parse_descriptor_proto()
918 })
919 }
920}