mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 20:42:59 +01:00
Only consider nodes missing relevant services after 40 failed attemps
Missed this change in previous backports as it was burried in SegWit commits.
This commit is contained in:
parent
c45c767f8e
commit
67196dc812
@ -1795,6 +1795,10 @@ void CConnman::ThreadOpenConnections()
|
|||||||
if (nANow - addr.nLastTry < 600 && nTries < 30)
|
if (nANow - addr.nLastTry < 600 && nTries < 30)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// only consider nodes missing relevant services after 40 failed attempts
|
||||||
|
if ((addr.nServices & nRelevantServices) != nRelevantServices && nTries < 40)
|
||||||
|
continue;
|
||||||
|
|
||||||
// do not allow non-default ports, unless after 50 invalid addresses selected already
|
// do not allow non-default ports, unless after 50 invalid addresses selected already
|
||||||
if (addr.GetPort() != Params().GetDefaultPort() && nTries < 50)
|
if (addr.GetPort() != Params().GetDefaultPort() && nTries < 50)
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user