|
|
@ -665,7 +665,7 @@ void CNode::copyStats(CNodeStats &stats) |
|
|
|
X(cleanSubVer); |
|
|
|
X(cleanSubVer); |
|
|
|
} |
|
|
|
} |
|
|
|
X(fInbound); |
|
|
|
X(fInbound); |
|
|
|
X(fAddnode); |
|
|
|
X(m_manual_connection); |
|
|
|
X(nStartingHeight); |
|
|
|
X(nStartingHeight); |
|
|
|
{ |
|
|
|
{ |
|
|
|
LOCK(cs_vSend); |
|
|
|
LOCK(cs_vSend); |
|
|
@ -1738,7 +1738,7 @@ void CConnman::ThreadOpenConnections() |
|
|
|
{ |
|
|
|
{ |
|
|
|
LOCK(cs_vNodes); |
|
|
|
LOCK(cs_vNodes); |
|
|
|
for (CNode* pnode : vNodes) { |
|
|
|
for (CNode* pnode : vNodes) { |
|
|
|
if (!pnode->fInbound && !pnode->fAddnode) { |
|
|
|
if (!pnode->fInbound && !pnode->m_manual_connection) { |
|
|
|
|
|
|
|
|
|
|
|
// Count the peers that have all relevant services
|
|
|
|
// Count the peers that have all relevant services
|
|
|
|
if (pnode->fSuccessfullyConnected && !pnode->fFeeler && ((pnode->nServices & nRelevantServices) == nRelevantServices)) { |
|
|
|
if (pnode->fSuccessfullyConnected && !pnode->fFeeler && ((pnode->nServices & nRelevantServices) == nRelevantServices)) { |
|
|
@ -1934,7 +1934,7 @@ void CConnman::ThreadOpenAddedConnections() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// if successful, this moves the passed grant to the constructed node
|
|
|
|
// if successful, this moves the passed grant to the constructed node
|
|
|
|
bool CConnman::OpenNetworkConnection(const CAddress& addrConnect, bool fCountFailure, CSemaphoreGrant *grantOutbound, const char *pszDest, bool fOneShot, bool fFeeler, bool fAddnode) |
|
|
|
bool CConnman::OpenNetworkConnection(const CAddress& addrConnect, bool fCountFailure, CSemaphoreGrant *grantOutbound, const char *pszDest, bool fOneShot, bool fFeeler, bool manual_connection) |
|
|
|
{ |
|
|
|
{ |
|
|
|
//
|
|
|
|
//
|
|
|
|
// Initiate outbound network connection
|
|
|
|
// Initiate outbound network connection
|
|
|
@ -1963,8 +1963,8 @@ bool CConnman::OpenNetworkConnection(const CAddress& addrConnect, bool fCountFai |
|
|
|
pnode->fOneShot = true; |
|
|
|
pnode->fOneShot = true; |
|
|
|
if (fFeeler) |
|
|
|
if (fFeeler) |
|
|
|
pnode->fFeeler = true; |
|
|
|
pnode->fFeeler = true; |
|
|
|
if (fAddnode) |
|
|
|
if (manual_connection) |
|
|
|
pnode->fAddnode = true; |
|
|
|
pnode->m_manual_connection = true; |
|
|
|
|
|
|
|
|
|
|
|
GetNodeSignals().InitializeNode(pnode, *this); |
|
|
|
GetNodeSignals().InitializeNode(pnode, *this); |
|
|
|
{ |
|
|
|
{ |
|
|
@ -2704,7 +2704,7 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn |
|
|
|
strSubVer = ""; |
|
|
|
strSubVer = ""; |
|
|
|
fWhitelisted = false; |
|
|
|
fWhitelisted = false; |
|
|
|
fOneShot = false; |
|
|
|
fOneShot = false; |
|
|
|
fAddnode = false; |
|
|
|
m_manual_connection = false; |
|
|
|
fClient = false; // set by version message
|
|
|
|
fClient = false; // set by version message
|
|
|
|
fFeeler = false; |
|
|
|
fFeeler = false; |
|
|
|
fSuccessfullyConnected = false; |
|
|
|
fSuccessfullyConnected = false; |
|
|
|