mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-13 03:09:37 +01:00
pcp: make the ToString method const
This commit is contained in:
parent
ede388d03d
commit
01906ce912
2 changed files with 2 additions and 2 deletions
|
@ -512,7 +512,7 @@ std::variant<MappingResult, MappingError> PCPRequestPortMap(const PCPMappingNonc
|
||||||
return MappingResult(PCP_VERSION, CService(internal, port), CService(external_addr, external_port), lifetime_ret);
|
return MappingResult(PCP_VERSION, CService(internal, port), CService(external_addr, external_port), lifetime_ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string MappingResult::ToString()
|
std::string MappingResult::ToString() const
|
||||||
{
|
{
|
||||||
Assume(version == NATPMP_VERSION || version == PCP_VERSION);
|
Assume(version == NATPMP_VERSION || version == PCP_VERSION);
|
||||||
return strprintf("%s:%s -> %s (for %ds)",
|
return strprintf("%s:%s -> %s (for %ds)",
|
||||||
|
|
|
@ -40,7 +40,7 @@ struct MappingResult {
|
||||||
uint32_t lifetime;
|
uint32_t lifetime;
|
||||||
|
|
||||||
//! Format mapping as string for logging.
|
//! Format mapping as string for logging.
|
||||||
std::string ToString();
|
std::string ToString() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
//! Try to open a port using RFC 6886 NAT-PMP. IPv4 only.
|
//! Try to open a port using RFC 6886 NAT-PMP. IPv4 only.
|
||||||
|
|
Loading…
Add table
Reference in a new issue