Only store and connect to NODE_NETWORK nodes

This commit is contained in:
Pieter Wuille
2016-03-26 13:31:25 +01:00
committed by lateminer
parent 0c7d5a8af8
commit be365a0d15
2 changed files with 7 additions and 0 deletions

View File

@@ -1609,6 +1609,10 @@ void ThreadOpenConnections()
if (IsLimited(addr))
continue;
// only connect to full nodes
if (!(addr.nServices & NODE_NETWORK))
continue;
// only consider very recently tried nodes after 30 failed attempts
if (nANow - addr.nLastTry < 600 && nTries < 30)
continue;