mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
net: remove CNetAddr::ToString() and use ToStringAddr() instead
Both methods do the same thing, so simplify to having just one. Further, `CService` inherits `CNetAddr` and `CService::ToString()` overrides `CNetAddr::ToString()` but the latter is not virtual which may be confusing. Avoid such a confusion by not having non-virtual methods with the same names in inheritance.
This commit is contained in:
@@ -681,7 +681,7 @@ bool AddrManImpl::Add_(const std::vector<CAddress>& vAddr, const CNetAddr& sourc
|
||||
added += AddSingle(*it, source, time_penalty) ? 1 : 0;
|
||||
}
|
||||
if (added > 0) {
|
||||
LogPrint(BCLog::ADDRMAN, "Added %i addresses (of %i) from %s: %i tried, %i new\n", added, vAddr.size(), source.ToString(), nTried, nNew);
|
||||
LogPrint(BCLog::ADDRMAN, "Added %i addresses (of %i) from %s: %i tried, %i new\n", added, vAddr.size(), source.ToStringAddr(), nTried, nNew);
|
||||
}
|
||||
return added > 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user