File tree Expand file tree Collapse file tree 2 files changed +13
-14
lines changed Expand file tree Collapse file tree 2 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -492,19 +492,6 @@ class CAddrMan
492
492
return vRandom.size ();
493
493
}
494
494
495
- // ! Consistency check
496
- void Check ()
497
- {
498
- #ifdef DEBUG_ADDRMAN
499
- {
500
- LOCK (cs);
501
- int err;
502
- if ((err=Check_ ()))
503
- LogPrintf (" ADDRMAN CONSISTENCY CHECK FAILED!!! err=%i\n " , err);
504
- }
505
- #endif
506
- }
507
-
508
495
// ! Add a single address.
509
496
bool Add (const CAddress &addr, const CNetAddr& source, int64_t nTimePenalty = 0 )
510
497
{
@@ -725,6 +712,19 @@ class CAddrMan
725
712
// ! Return a random to-be-evicted tried table address.
726
713
CAddrInfo SelectTriedCollision_ () EXCLUSIVE_LOCKS_REQUIRED(cs);
727
714
715
+ // ! Consistency check
716
+ void Check ()
717
+ {
718
+ #ifdef DEBUG_ADDRMAN
719
+ {
720
+ LOCK (cs);
721
+ int err;
722
+ if ((err=Check_ ()))
723
+ LogPrintf (" ADDRMAN CONSISTENCY CHECK FAILED!!! err=%i\n " , err);
724
+ }
725
+ #endif
726
+ }
727
+
728
728
#ifdef DEBUG_ADDRMAN
729
729
// ! Perform consistency check. Returns an error code or zero.
730
730
int Check_ () EXCLUSIVE_LOCKS_REQUIRED(cs);
Original file line number Diff line number Diff line change @@ -107,7 +107,6 @@ FUZZ_TARGET_INIT(addrman, initialize_addrman)
107
107
/* max_addresses */ fuzzed_data_provider.ConsumeIntegralInRange <size_t >(0 , 4096 ),
108
108
/* max_pct */ fuzzed_data_provider.ConsumeIntegralInRange <size_t >(0 , 4096 ),
109
109
/* network */ std::nullopt);
110
- (void )/* const_*/ addr_man.Check ();
111
110
(void )/* const_*/ addr_man.Select (fuzzed_data_provider.ConsumeBool ());
112
111
(void )const_addr_man.size ();
113
112
CDataStream data_stream (SER_NETWORK, PROTOCOL_VERSION);
You can’t perform that action at this time.
0 commit comments