mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-06 16:34:22 +01:00
[addrman] Rename Add_() to AddSingle()
This commit is contained in:
parent
e58598e833
commit
2658eb6d68
2 changed files with 5 additions and 3 deletions
|
@ -592,7 +592,7 @@ void AddrManImpl::Good_(const CService& addr, bool test_before_evict, int64_t nT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AddrManImpl::Add_(const CAddress& addr, const CNetAddr& source, int64_t nTimePenalty)
|
bool AddrManImpl::AddSingle(const CAddress& addr, const CNetAddr& source, int64_t nTimePenalty)
|
||||||
{
|
{
|
||||||
AssertLockHeld(cs);
|
AssertLockHeld(cs);
|
||||||
|
|
||||||
|
@ -1034,7 +1034,7 @@ bool AddrManImpl::Add(const std::vector<CAddress>& vAddr, const CNetAddr& source
|
||||||
int nAdd = 0;
|
int nAdd = 0;
|
||||||
Check();
|
Check();
|
||||||
for (std::vector<CAddress>::const_iterator it = vAddr.begin(); it != vAddr.end(); it++)
|
for (std::vector<CAddress>::const_iterator it = vAddr.begin(); it != vAddr.end(); it++)
|
||||||
nAdd += Add_(*it, source, nTimePenalty) ? 1 : 0;
|
nAdd += AddSingle(*it, source, nTimePenalty) ? 1 : 0;
|
||||||
Check();
|
Check();
|
||||||
if (nAdd) {
|
if (nAdd) {
|
||||||
LogPrint(BCLog::ADDRMAN, "Added %i addresses from %s: %i tried, %i new\n", nAdd, source.ToString(), nTried, nNew);
|
LogPrint(BCLog::ADDRMAN, "Added %i addresses from %s: %i tried, %i new\n", nAdd, source.ToString(), nTried, nNew);
|
||||||
|
|
|
@ -244,7 +244,9 @@ private:
|
||||||
|
|
||||||
void Good_(const CService& addr, bool test_before_evict, int64_t time) EXCLUSIVE_LOCKS_REQUIRED(cs);
|
void Good_(const CService& addr, bool test_before_evict, int64_t time) EXCLUSIVE_LOCKS_REQUIRED(cs);
|
||||||
|
|
||||||
bool Add_(const CAddress& addr, const CNetAddr& source, int64_t nTimePenalty) EXCLUSIVE_LOCKS_REQUIRED(cs);
|
/** Attempt to add a single address to addrman's new table.
|
||||||
|
* @see AddrMan::Add() for parameters. */
|
||||||
|
bool AddSingle(const CAddress& addr, const CNetAddr& source, int64_t nTimePenalty) EXCLUSIVE_LOCKS_REQUIRED(cs);
|
||||||
|
|
||||||
void Attempt_(const CService& addr, bool fCountFailure, int64_t nTime) EXCLUSIVE_LOCKS_REQUIRED(cs);
|
void Attempt_(const CService& addr, bool fCountFailure, int64_t nTime) EXCLUSIVE_LOCKS_REQUIRED(cs);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue