diff options
author | Pieter Wuille <pieter@wuille.net> | 2021-10-05 16:13:41 -0400 |
---|---|---|
committer | Pieter Wuille <pieter@wuille.net> | 2021-10-22 12:06:36 -0400 |
commit | 92617b7a758c0425330fba4b886296730567927c (patch) | |
tree | 4a377242223309d1f0aca1fefb0544b99d42044c /src/addrman.cpp | |
parent | ff65b696f3c6f6e17a790c6646249163ddb39eda (diff) |
Make AddrMan support multiple ports per IP
Diffstat (limited to 'src/addrman.cpp')
-rw-r--r-- | src/addrman.cpp | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/addrman.cpp b/src/addrman.cpp index c364a7710b..92937abcb5 100644 --- a/src/addrman.cpp +++ b/src/addrman.cpp @@ -401,7 +401,7 @@ void AddrManImpl::Unserialize(Stream& s_) } } -AddrInfo* AddrManImpl::Find(const CNetAddr& addr, int* pnId) +AddrInfo* AddrManImpl::Find(const CService& addr, int* pnId) { AssertLockHeld(cs); @@ -556,10 +556,6 @@ void AddrManImpl::Good_(const CService& addr, bool test_before_evict, int64_t nT AddrInfo& info = *pinfo; - // check whether we are talking about the exact same CService (including same port) - if (info != addr) - return; - // update info info.nLastSuccess = nTime; info.nLastTry = nTime; @@ -683,10 +679,6 @@ void AddrManImpl::Attempt_(const CService& addr, bool fCountFailure, int64_t nTi AddrInfo& info = *pinfo; - // check whether we are talking about the exact same CService (including same port) - if (info != addr) - return; - // update info info.nLastTry = nTime; if (fCountFailure && info.nLastCountAttempt < nLastGood) { @@ -796,10 +788,6 @@ void AddrManImpl::Connected_(const CService& addr, int64_t nTime) AddrInfo& info = *pinfo; - // check whether we are talking about the exact same CService (including same port) - if (info != addr) - return; - // update info int64_t nUpdateInterval = 20 * 60; if (nTime - info.nTime > nUpdateInterval) @@ -818,10 +806,6 @@ void AddrManImpl::SetServices_(const CService& addr, ServiceFlags nServices) AddrInfo& info = *pinfo; - // check whether we are talking about the exact same CService (including same port) - if (info != addr) - return; - // update info info.nServices = nServices; } |