Skip to content

Commit 2658eb6

Browse files
committed
[addrman] Rename Add_() to AddSingle()
1 parent e58598e commit 2658eb6

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/addrman.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ void AddrManImpl::Good_(const CService& addr, bool test_before_evict, int64_t nT
592592
}
593593
}
594594

595-
bool AddrManImpl::Add_(const CAddress& addr, const CNetAddr& source, int64_t nTimePenalty)
595+
bool AddrManImpl::AddSingle(const CAddress& addr, const CNetAddr& source, int64_t nTimePenalty)
596596
{
597597
AssertLockHeld(cs);
598598

@@ -1034,7 +1034,7 @@ bool AddrManImpl::Add(const std::vector<CAddress>& vAddr, const CNetAddr& source
10341034
int nAdd = 0;
10351035
Check();
10361036
for (std::vector<CAddress>::const_iterator it = vAddr.begin(); it != vAddr.end(); it++)
1037-
nAdd += Add_(*it, source, nTimePenalty) ? 1 : 0;
1037+
nAdd += AddSingle(*it, source, nTimePenalty) ? 1 : 0;
10381038
Check();
10391039
if (nAdd) {
10401040
LogPrint(BCLog::ADDRMAN, "Added %i addresses from %s: %i tried, %i new\n", nAdd, source.ToString(), nTried, nNew);

src/addrman_impl.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,9 @@ class AddrManImpl
244244

245245
void Good_(const CService& addr, bool test_before_evict, int64_t time) EXCLUSIVE_LOCKS_REQUIRED(cs);
246246

247-
bool Add_(const CAddress& addr, const CNetAddr& source, int64_t nTimePenalty) EXCLUSIVE_LOCKS_REQUIRED(cs);
247+
/** Attempt to add a single address to addrman's new table.
248+
* @see AddrMan::Add() for parameters. */
249+
bool AddSingle(const CAddress& addr, const CNetAddr& source, int64_t nTimePenalty) EXCLUSIVE_LOCKS_REQUIRED(cs);
248250

249251
void Attempt_(const CService& addr, bool fCountFailure, int64_t nTime) EXCLUSIVE_LOCKS_REQUIRED(cs);
250252

0 commit comments

Comments
 (0)