net, refactor: pass reference for peer address in GetReachabilityFrom

The address of the peer always exists (because addr is a member of
CNode), so it was not possible to pass a nullptr before.
Also remove NET_UNKNOWN, which is unused now.
This commit is contained in:
Martin Zumsande
2023-04-11 16:10:28 -04:00
parent 62d73f5370
commit e4d541c7cf
4 changed files with 9 additions and 13 deletions

View File

@@ -203,7 +203,7 @@ public:
bool HasLinkedIPv4() const;
std::vector<unsigned char> GetAddrBytes() const;
int GetReachabilityFrom(const CNetAddr* paddrPartner = nullptr) const;
int GetReachabilityFrom(const CNetAddr& paddrPartner) const;
explicit CNetAddr(const struct in6_addr& pipv6Addr, const uint32_t scope = 0);
bool GetIn6Addr(struct in6_addr* pipv6Addr) const;