From 944a9de08a00f8273e73cd28b40e46cc0eb0bad1 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Fri, 15 Jul 2022 13:49:17 +0200 Subject: 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. --- src/addrman.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/addrman.cpp') diff --git a/src/addrman.cpp b/src/addrman.cpp index f16ff2230b..b2fd233195 100644 --- a/src/addrman.cpp +++ b/src/addrman.cpp @@ -681,7 +681,7 @@ bool AddrManImpl::Add_(const std::vector& 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; } -- cgit v1.2.3