Make CAddrMan::Check private
Change in the addrman.h header is move-only.
This commit is contained in:
2 files changed
+13
-14
No files matched your search
+13
-13
@@ -492,19 +492,6 @@ public:
|
|||||||
return vRandom.size();
|
return vRandom.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Consistency check
|
|
||||||
void Check()
|
|
||||||
{
|
|
||||||
#ifdef DEBUG_ADDRMAN
|
|
||||||
{
|
|
||||||
LOCK(cs);
|
|
||||||
int err;
|
|
||||||
if ((err=Check_()))
|
|
||||||
LogPrintf("ADDRMAN CONSISTENCY CHECK FAILED!!! err=%i\n", err);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Add a single address.
|
//! Add a single address.
|
||||||
bool Add(const CAddress &addr, const CNetAddr& source, int64_t nTimePenalty = 0)
|
bool Add(const CAddress &addr, const CNetAddr& source, int64_t nTimePenalty = 0)
|
||||||
{
|
{
|
||||||
@@ -725,6 +712,19 @@ private:
|
|||||||
//! Return a random to-be-evicted tried table address.
|
//! Return a random to-be-evicted tried table address.
|
||||||
CAddrInfo SelectTriedCollision_() EXCLUSIVE_LOCKS_REQUIRED(cs);
|
CAddrInfo SelectTriedCollision_() EXCLUSIVE_LOCKS_REQUIRED(cs);
|
||||||
|
|
||||||
|
//! Consistency check
|
||||||
|
void Check()
|
||||||
|
{
|
||||||
|
#ifdef DEBUG_ADDRMAN
|
||||||
|
{
|
||||||
|
LOCK(cs);
|
||||||
|
int err;
|
||||||
|
if ((err=Check_()))
|
||||||
|
LogPrintf("ADDRMAN CONSISTENCY CHECK FAILED!!! err=%i\n", err);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_ADDRMAN
|
#ifdef DEBUG_ADDRMAN
|
||||||
//! Perform consistency check. Returns an error code or zero.
|
//! Perform consistency check. Returns an error code or zero.
|
||||||
int Check_() EXCLUSIVE_LOCKS_REQUIRED(cs);
|
int Check_() EXCLUSIVE_LOCKS_REQUIRED(cs);
|
||||||
|
|||||||
@@ -107,7 +107,6 @@ FUZZ_TARGET_INIT(addrman, initialize_addrman)
|
|||||||
/* max_addresses */ fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, 4096),
|
/* max_addresses */ fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, 4096),
|
||||||
/* max_pct */ fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, 4096),
|
/* max_pct */ fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, 4096),
|
||||||
/* network */ std::nullopt);
|
/* network */ std::nullopt);
|
||||||
(void)/*const_*/addr_man.Check();
|
|
||||||
(void)/*const_*/addr_man.Select(fuzzed_data_provider.ConsumeBool());
|
(void)/*const_*/addr_man.Select(fuzzed_data_provider.ConsumeBool());
|
||||||
(void)const_addr_man.size();
|
(void)const_addr_man.size();
|
||||||
CDataStream data_stream(SER_NETWORK, PROTOCOL_VERSION);
|
CDataStream data_stream(SER_NETWORK, PROTOCOL_VERSION);
|
||||||
|
|||||||
Reference in new issue
Block a user