diff --git a/src/main.cpp b/src/main.cpp index 79083c2b738d1..0e0746ec8f6d5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5396,7 +5396,7 @@ bool static ProcessMessage(CNode* pfrom, std::string strCommand, CDataStream& vR for (CAddress& addr : vAddr) { boost::this_thread::interruption_point(); - if (!(addr.nServices & NODE_NETWORK)) + if ((addr.nServices & REQUIRED_SERVICES) != REQUIRED_SERVICES) continue; if (addr.nTime <= 100000000 || addr.nTime > nNow + 10 * 60) diff --git a/src/net.cpp b/src/net.cpp index d76ff7df7c024..ba45b885654f0 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1439,7 +1439,7 @@ void ThreadOpenConnections() continue; // only connect to full nodes - if (!(addr.nServices & NODE_NETWORK)) + if ((addr.nServices & REQUIRED_SERVICES) != REQUIRED_SERVICES) continue; // only consider very recently tried nodes after 30 failed attempts diff --git a/src/net.h b/src/net.h index 31b2d4c79a85e..24b5a5601f3fc 100644 --- a/src/net.h +++ b/src/net.h @@ -71,6 +71,8 @@ static const unsigned int DEFAULT_MAX_PEER_CONNECTIONS = 125; /** Maximum number of peers added to setOffsetDisconnectedPeers before triggering a warning */ #define MAX_TIMEOFFSET_DISCONNECTIONS 16 +static const ServiceFlags REQUIRED_SERVICES = NODE_NETWORK; + unsigned int ReceiveFloodSize(); unsigned int SendBufferSize();