Changeset View
Changeset View
Standalone View
Standalone View
src/net.cpp
Show First 20 Lines • Show All 2,087 Lines • ▼ Show 20 Lines | while (true) { | ||||
// Retry every 60 seconds if a connection was attempted, otherwise two | // Retry every 60 seconds if a connection was attempted, otherwise two | ||||
// seconds. | // seconds. | ||||
if (!interruptNet.sleep_for(std::chrono::seconds(tried ? 60 : 2))) { | if (!interruptNet.sleep_for(std::chrono::seconds(tried ? 60 : 2))) { | ||||
return; | return; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
// If successful, this moves the passed grant to the constructed node. | // If successful, this moves the passed grant to the constructed node. | ||||
jasonbcox: ~6 changes missing from this file | |||||
nakihitoAuthorUnsubmitted Done Inline ActionsLooks like deadalnix got them here: https://reviews.bitcoinabc.org/D1863 nakihito: Looks like deadalnix got them here: https://reviews.bitcoinabc.org/D1863 | |||||
void CConnman::OpenNetworkConnection(const CAddress &addrConnect, | void CConnman::OpenNetworkConnection(const CAddress &addrConnect, | ||||
bool fCountFailure, | bool fCountFailure, | ||||
CSemaphoreGrant *grantOutbound, | CSemaphoreGrant *grantOutbound, | ||||
const char *pszDest, bool fOneShot, | const char *pszDest, bool fOneShot, | ||||
bool fFeeler, bool manual_connection) { | bool fFeeler, bool manual_connection) { | ||||
// | // | ||||
// Initiate outbound network connection | // Initiate outbound network connection | ||||
// | // | ||||
if (interruptNet) { | if (interruptNet) { | ||||
return; | return; | ||||
} | } | ||||
if (!fNetworkActive) { | if (!fNetworkActive) { | ||||
return; | return; | ||||
} | } | ||||
if (!pszDest) { | if (!pszDest) { | ||||
if (IsLocal(addrConnect) || FindNode((CNetAddr)addrConnect) || | if (IsLocal(addrConnect) || | ||||
FindNode(static_cast<CNetAddr>(addrConnect)) || | |||||
IsBanned(addrConnect) || FindNode(addrConnect.ToStringIPPort())) { | IsBanned(addrConnect) || FindNode(addrConnect.ToStringIPPort())) { | ||||
return; | return; | ||||
} | } | ||||
} else if (FindNode(std::string(pszDest))) { | } else if (FindNode(std::string(pszDest))) { | ||||
return; | return; | ||||
} | } | ||||
CNode *pnode = ConnectNode(addrConnect, pszDest, fCountFailure); | CNode *pnode = ConnectNode(addrConnect, pszDest, fCountFailure); | ||||
▲ Show 20 Lines • Show All 975 Lines • Show Last 20 Lines |
~6 changes missing from this file