aboutsummaryrefslogtreecommitdiff
path: root/src/addrman.h
diff options
context:
space:
mode:
authorAmiti Uttarwar <amiti@uttarwar.org>2021-07-22 17:00:36 -0700
committerAmiti Uttarwar <amiti@uttarwar.org>2021-08-15 22:35:13 -0700
commit60e0cbdd574bb9109bcad1e0c27c7936a534a0e7 (patch)
treeb3c49dced04e42234b507682e033706b99d12232 /src/addrman.h
parent3facf0a8ae99a03f5e2fb709b8d86c47328d363c (diff)
downloadbitcoin-60e0cbdd574bb9109bcad1e0c27c7936a534a0e7.tar.xz
[addrman] Merge the two Add() functions
Merge the two definitions of this overloaded function to reduce code duplication.
Diffstat (limited to 'src/addrman.h')
-rw-r--r--src/addrman.h17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/addrman.h b/src/addrman.h
index 3ee8c3ee09..fa155fb00a 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -517,22 +517,7 @@ public:
return vRandom.size();
}
- //! Add a single address.
- bool Add(const CAddress &addr, const CNetAddr& source, int64_t nTimePenalty = 0)
- EXCLUSIVE_LOCKS_REQUIRED(!cs)
- {
- LOCK(cs);
- bool fRet = false;
- Check();
- fRet |= Add_(addr, source, nTimePenalty);
- Check();
- if (fRet) {
- LogPrint(BCLog::ADDRMAN, "Added %s from %s: %i tried, %i new\n", addr.ToStringIPPort(), source.ToString(), nTried, nNew);
- }
- return fRet;
- }
-
- //! Add multiple addresses.
+ //! Add addresses to addrman's new table.
bool Add(const std::vector<CAddress> &vAddr, const CNetAddr& source, int64_t nTimePenalty = 0)
EXCLUSIVE_LOCKS_REQUIRED(!cs)
{