Only store and connect to NODE_NETWORK nodes
This commit is contained in:
parent
fc83f18153
commit
5e7ab16d29
2 changed files with 7 additions and 0 deletions
|
@ -4785,6 +4785,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
|
||||||
{
|
{
|
||||||
boost::this_thread::interruption_point();
|
boost::this_thread::interruption_point();
|
||||||
|
|
||||||
|
if (!(addr.nServices & NODE_NETWORK))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (addr.nTime <= 100000000 || addr.nTime > nNow + 10 * 60)
|
if (addr.nTime <= 100000000 || addr.nTime > nNow + 10 * 60)
|
||||||
addr.nTime = nNow - 5 * 24 * 60 * 60;
|
addr.nTime = nNow - 5 * 24 * 60 * 60;
|
||||||
pfrom->AddAddressKnown(addr);
|
pfrom->AddAddressKnown(addr);
|
||||||
|
|
|
@ -1596,6 +1596,10 @@ void ThreadOpenConnections()
|
||||||
if (IsLimited(addr))
|
if (IsLimited(addr))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// only connect to full nodes
|
||||||
|
if (!(addr.nServices & NODE_NETWORK))
|
||||||
|
continue;
|
||||||
|
|
||||||
// only consider very recently tried nodes after 30 failed attempts
|
// only consider very recently tried nodes after 30 failed attempts
|
||||||
if (nANow - addr.nLastTry < 600 && nTries < 30)
|
if (nANow - addr.nLastTry < 600 && nTries < 30)
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Reference in a new issue