mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
net: remove CService::ToStringPort()
It is used only internally in `CService::ToStringAddrPort()`.
This commit is contained in:
@@ -911,17 +911,14 @@ std::vector<unsigned char> CService::GetKey() const
|
||||
return key;
|
||||
}
|
||||
|
||||
std::string CService::ToStringPort() const
|
||||
{
|
||||
return strprintf("%u", port);
|
||||
}
|
||||
|
||||
std::string CService::ToStringAddrPort() const
|
||||
{
|
||||
const auto port_str = strprintf("%u", port);
|
||||
|
||||
if (IsIPv4() || IsTor() || IsI2P() || IsInternal()) {
|
||||
return ToStringAddr() + ":" + ToStringPort();
|
||||
return ToStringAddr() + ":" + port_str;
|
||||
} else {
|
||||
return "[" + ToStringAddr() + "]:" + ToStringPort();
|
||||
return "[" + ToStringAddr() + "]:" + port_str;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user