@@ -72,14 +72,14 @@ namespace {
7272const static std::string NET_MESSAGE_COMMAND_OTHER = " *other*" ;
7373
7474/* * Services this node implementation cares about */
75- static const uint64_t nRelevantServices = NODE_NETWORK;
75+ static const ServiceFlags nRelevantServices = NODE_NETWORK;
7676
7777//
7878// Global state variables
7979//
8080bool fDiscover = true ;
8181bool fListen = true ;
82- uint64_t nLocalServices = NODE_NETWORK;
82+ ServiceFlags nLocalServices = NODE_NETWORK;
8383bool fRelayTxes = true ;
8484CCriticalSection cs_mapLocalHost;
8585std::map<CNetAddr, LocalServiceInfo> mapLocalHost;
@@ -175,7 +175,7 @@ static std::vector<CAddress> convertSeed6(const std::vector<SeedSpec6> &vSeedsIn
175175// one by discovery.
176176CAddress GetLocalAddress (const CNetAddr *paddrPeer)
177177{
178- CAddress ret (CService (" 0.0.0.0" ,GetListenPort ()),0 );
178+ CAddress ret (CService (" 0.0.0.0" ,GetListenPort ()), NODE_NONE );
179179 CService addr;
180180 if (GetLocal (addr, paddrPeer))
181181 {
@@ -411,7 +411,7 @@ CNode* ConnectNode(CAddress addrConnect, const char *pszDest, bool fCountFailure
411411 vNodes.push_back (pnode);
412412 }
413413
414- pnode->nServicesExpected = addrConnect.nServices & nRelevantServices;
414+ pnode->nServicesExpected = ServiceFlags ( addrConnect.nServices & nRelevantServices) ;
415415 pnode->nTimeConnected = GetTime ();
416416
417417 return pnode;
@@ -464,14 +464,14 @@ void CNode::PushVersion()
464464 int nBestHeight = GetNodeSignals ().GetHeight ().get_value_or (0 );
465465
466466 int64_t nTime = (fInbound ? GetAdjustedTime () : GetTime ());
467- CAddress addrYou = (addr.IsRoutable () && !IsProxy (addr) ? addr : CAddress (CService (" 0.0.0.0" ,0 ), addr.nServices ));
467+ CAddress addrYou = (addr.IsRoutable () && !IsProxy (addr) ? addr : CAddress (CService (" 0.0.0.0" , 0 ), addr.nServices ));
468468 CAddress addrMe = GetLocalAddress (&addr);
469469 GetRandBytes ((unsigned char *)&nLocalHostNonce, sizeof (nLocalHostNonce));
470470 if (fLogIPs )
471471 LogPrint (" net" , " send version message: version %d, blocks=%d, us=%s, them=%s, peer=%d\n " , PROTOCOL_VERSION, nBestHeight, addrMe.ToString (), addrYou.ToString (), id);
472472 else
473473 LogPrint (" net" , " send version message: version %d, blocks=%d, us=%s, peer=%d\n " , PROTOCOL_VERSION, nBestHeight, addrMe.ToString (), id);
474- PushMessage (NetMsgType::VERSION, PROTOCOL_VERSION, nLocalServices, nTime, addrYou, addrMe,
474+ PushMessage (NetMsgType::VERSION, PROTOCOL_VERSION, ( uint64_t ) nLocalServices, nTime, addrYou, addrMe,
475475 nLocalHostNonce, strSubVersion, nBestHeight, ::fRelayTxes );
476476}
477477
@@ -1440,7 +1440,7 @@ void ThreadDNSAddressSeed()
14401440 } else {
14411441 std::vector<CNetAddr> vIPs;
14421442 std::vector<CAddress> vAdd;
1443- uint64_t requiredServiceBits = nRelevantServices;
1443+ ServiceFlags requiredServiceBits = nRelevantServices;
14441444 if (LookupHost (seed.getHost (requiredServiceBits).c_str (), vIPs, 0 , true ))
14451445 {
14461446 BOOST_FOREACH (const CNetAddr& ip, vIPs)
@@ -1523,7 +1523,7 @@ void ThreadOpenConnections()
15231523 ProcessOneShot ();
15241524 BOOST_FOREACH (const std::string& strAddr, mapMultiArgs[" -connect" ])
15251525 {
1526- CAddress addr (CService (), 0 );
1526+ CAddress addr (CService (), NODE_NONE );
15271527 OpenNetworkConnection (addr, false , NULL , strAddr.c_str ());
15281528 for (int i = 0 ; i < 10 && i < nLoop; i++)
15291529 {
@@ -1674,8 +1674,8 @@ void ThreadOpenAddedConnections()
16741674 {
16751675 CSemaphoreGrant grant (*semOutbound);
16761676 /* We want -addnode to work even for nodes that don't provide all
1677- * wanted services, so pass in nServices=0 to CAddress. */
1678- OpenNetworkConnection (CAddress (vserv[i % vserv.size ()], 0 ), false , &grant);
1677+ * wanted services, so pass in nServices=NODE_NONE to CAddress. */
1678+ OpenNetworkConnection (CAddress (vserv[i % vserv.size ()], NODE_NONE ), false , &grant);
16791679 MilliSleep (500 );
16801680 }
16811681 MilliSleep (120000 ); // Retry every 2 minutes
@@ -2333,8 +2333,8 @@ CNode::CNode(SOCKET hSocketIn, const CAddress& addrIn, const std::string& addrNa
23332333 addrKnown(5000 , 0.001 ),
23342334 filterInventoryKnown(50000 , 0.000001 )
23352335{
2336- nServices = 0 ;
2337- nServicesExpected = 0 ;
2336+ nServices = NODE_NONE ;
2337+ nServicesExpected = NODE_NONE ;
23382338 hSocket = hSocketIn;
23392339 nRecvVersion = INIT_PROTO_VERSION;
23402340 nLastSend = 0 ;
0 commit comments