From ec45646de9e62b3d42c85716bfeb06d8f2b507dc Mon Sep 17 00:00:00 2001 From: Gleb Naumenko Date: Tue, 24 Dec 2019 13:18:44 -0500 Subject: Integrate ASN bucketing in Addrman and add tests Instead of using /16 netgroups to bucket nodes in Addrman for connection diversification, ASN, which better represents an actor in terms of network-layer infrastructure, is used. For testing, asmap.raw is used. It represents a minimal asmap needed for testing purposes. --- src/netaddress.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/netaddress.h') diff --git a/src/netaddress.h b/src/netaddress.h index fbb1553338..b1a6054e48 100644 --- a/src/netaddress.h +++ b/src/netaddress.h @@ -78,7 +78,8 @@ class CNetAddr unsigned int GetByte(int n) const; uint64_t GetHash() const; bool GetInAddr(struct in_addr* pipv4Addr) const; - std::vector GetGroup() const; + std::vector GetGroup(const std::vector &asmap) const; + int GetReachabilityFrom(const CNetAddr *paddrPartner = nullptr) const; explicit CNetAddr(const struct in6_addr& pipv6Addr, const uint32_t scope = 0); -- cgit v1.2.3