mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
net: remove CService::ToStringPort()
It is used only internally in `CService::ToStringAddrPort()`.
This commit is contained in:
parent
fd4f0f41e9
commit
c9d548c91f
3 changed files with 4 additions and 9 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue