Skip to content

Commit 6dba254

Browse files
sipaFuzzbawls
authored andcommitted
Only store and connect to NODE_NETWORK nodes
1 parent 1905a6a commit 6dba254

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/main.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5394,6 +5394,9 @@ bool static ProcessMessage(CNode* pfrom, std::string strCommand, CDataStream& vR
53945394
for (CAddress& addr : vAddr) {
53955395
boost::this_thread::interruption_point();
53965396

5397+
if (!(addr.nServices & NODE_NETWORK))
5398+
continue;
5399+
53975400
if (addr.nTime <= 100000000 || addr.nTime > nNow + 10 * 60)
53985401
addr.nTime = nNow - 5 * 24 * 60 * 60;
53995402
pfrom->AddAddressKnown(addr);

src/net.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,6 +1439,10 @@ void ThreadOpenConnections()
14391439
if (IsLimited(addr))
14401440
continue;
14411441

1442+
// only connect to full nodes
1443+
if (!(addr.nServices & NODE_NETWORK))
1444+
continue;
1445+
14421446
// only consider very recently tried nodes after 30 failed attempts
14431447
if (nANow - addr.nLastTry < 600 && nTries < 30)
14441448
continue;

0 commit comments

Comments
 (0)