0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-02 09:46:52 -05:00

refactor: Avoid recursive locking in CAddrMan::size

This commit is contained in:
Hennadii Stepanov 2021-05-23 18:54:23 +03:00
parent 2da95545ea
commit efc6fac951
No known key found for this signature in database
GPG key ID: 410108112E7EA81F

View file

@ -362,7 +362,7 @@ void CAddrMan::Attempt_(const CService& addr, bool fCountFailure, int64_t nTime)
CAddrInfo CAddrMan::Select_(bool newOnly) CAddrInfo CAddrMan::Select_(bool newOnly)
{ {
if (size() == 0) if (vRandom.empty())
return CAddrInfo(); return CAddrInfo();
if (newOnly && nNew == 0) if (newOnly && nNew == 0)