aboutsummaryrefslogtreecommitdiff
path: root/src/addrman_impl.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2021-10-05 16:13:41 -0400
committerPieter Wuille <pieter@wuille.net>2021-10-22 12:06:36 -0400
commit92617b7a758c0425330fba4b886296730567927c (patch)
tree4a377242223309d1f0aca1fefb0544b99d42044c /src/addrman_impl.h
parentff65b696f3c6f6e17a790c6646249163ddb39eda (diff)
Make AddrMan support multiple ports per IP
Diffstat (limited to 'src/addrman_impl.h')
-rw-r--r--src/addrman_impl.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/addrman_impl.h b/src/addrman_impl.h
index 1dc7f25f9c..f8191d6b85 100644
--- a/src/addrman_impl.h
+++ b/src/addrman_impl.h
@@ -179,8 +179,8 @@ private:
//! table with information about all nIds
std::unordered_map<int, AddrInfo> mapInfo GUARDED_BY(cs);
- //! find an nId based on its network address
- std::unordered_map<CNetAddr, int, CNetAddrHash> mapAddr GUARDED_BY(cs);
+ //! find an nId based on its network address and port.
+ std::unordered_map<CService, int, CServiceHash> mapAddr GUARDED_BY(cs);
//! randomly-ordered vector of all nIds
//! This is mutable because it is unobservable outside the class, so any
@@ -225,7 +225,7 @@ private:
const std::vector<bool> m_asmap;
//! Find an entry.
- AddrInfo* Find(const CNetAddr& addr, int* pnId = nullptr) EXCLUSIVE_LOCKS_REQUIRED(cs);
+ AddrInfo* Find(const CService& addr, int* pnId = nullptr) EXCLUSIVE_LOCKS_REQUIRED(cs);
//! Create a new entry and add it to the internal data structures mapInfo, mapAddr and vRandom.
AddrInfo* Create(const CAddress& addr, const CNetAddr& addrSource, int* pnId = nullptr) EXCLUSIVE_LOCKS_REQUIRED(cs);