From 92617b7a758c0425330fba4b886296730567927c Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Tue, 5 Oct 2021 16:13:41 -0400 Subject: Make AddrMan support multiple ports per IP --- src/addrman_impl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/addrman_impl.h') 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 mapInfo GUARDED_BY(cs); - //! find an nId based on its network address - std::unordered_map mapAddr GUARDED_BY(cs); + //! find an nId based on its network address and port. + std::unordered_map 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 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); -- cgit v1.2.3