net: remove CService::ToString() use ToStringAddrPort() instead

Both methods do the same thing, so simplify to having just one.

`ToString()` is too generic in this case and it is unclear what it does,
given that there are similar methods:
`ToStringAddr()` (inherited from `CNetAddr`),
`ToStringPort()` and
`ToStringAddrPort()`.
This commit is contained in:
Vasil Dimov
2022-07-15 14:13:39 +02:00
parent 944a9de08a
commit 96c791dd20
16 changed files with 79 additions and 86 deletions

View File

@@ -131,7 +131,7 @@ BOOST_AUTO_TEST_CASE(netbase_splithost)
bool static TestParse(std::string src, std::string canon)
{
CService addr(LookupNumeric(src, 65535));
return canon == addr.ToString();
return canon == addr.ToStringAddrPort();
}
BOOST_AUTO_TEST_CASE(netbase_lookupnumeric)