Skip to content

Commit 0670397

Browse files
committed
Make CAddrMan::Check private
Change in the addrman.h header is move-only.
1 parent efc6fac commit 0670397

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

src/addrman.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -492,19 +492,6 @@ class CAddrMan
492492
return vRandom.size();
493493
}
494494

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-
508495
//! Add a single address.
509496
bool Add(const CAddress &addr, const CNetAddr& source, int64_t nTimePenalty = 0)
510497
{
@@ -725,6 +712,19 @@ class CAddrMan
725712
//! Return a random to-be-evicted tried table address.
726713
CAddrInfo SelectTriedCollision_() EXCLUSIVE_LOCKS_REQUIRED(cs);
727714

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+
728728
#ifdef DEBUG_ADDRMAN
729729
//! Perform consistency check. Returns an error code or zero.
730730
int Check_() EXCLUSIVE_LOCKS_REQUIRED(cs);

src/test/fuzz/addrman.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ FUZZ_TARGET_INIT(addrman, initialize_addrman)
107107
/* max_addresses */ fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, 4096),
108108
/* max_pct */ fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, 4096),
109109
/* network */ std::nullopt);
110-
(void)/*const_*/addr_man.Check();
111110
(void)/*const_*/addr_man.Select(fuzzed_data_provider.ConsumeBool());
112111
(void)const_addr_man.size();
113112
CDataStream data_stream(SER_NETWORK, PROTOCOL_VERSION);

0 commit comments

Comments
 (0)