diff options
author | Gleb Naumenko <naumenko.gs@gmail.com> | 2019-12-24 13:18:44 -0500 |
---|---|---|
committer | Gleb Naumenko <naumenko.gs@gmail.com> | 2019-12-25 08:59:08 -0500 |
commit | ec45646de9e62b3d42c85716bfeb06d8f2b507dc (patch) | |
tree | 2d3717818d8ea1b9a53f9b53af2390f7aee9ac21 /src/netaddress.h | |
parent | 8feb4e4b667361bf23344149c01594abebd56fdb (diff) |
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.
Diffstat (limited to 'src/netaddress.h')
-rw-r--r-- | src/netaddress.h | 3 |
1 files changed, 2 insertions, 1 deletions
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<unsigned char> GetGroup() const; + std::vector<unsigned char> GetGroup(const std::vector<bool> &asmap) const; + int GetReachabilityFrom(const CNetAddr *paddrPartner = nullptr) const; explicit CNetAddr(const struct in6_addr& pipv6Addr, const uint32_t scope = 0); |