MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / GetFullOutboundConnCount

Method GetFullOutboundConnCount

src/net.cpp:2480–2492  ·  view source on GitHub ↗

Return the number of outbound connections that are full relay (not blocks only)

Source from the content-addressed store, hash-verified

2478
2479// Return the number of outbound connections that are full relay (not blocks only)
2480int CConnman::GetFullOutboundConnCount() const
2481{
2482 AssertLockNotHeld(m_nodes_mutex);
2483
2484 int nRelevant = 0;
2485 {
2486 LOCK(m_nodes_mutex);
2487 for (const CNode* pnode : m_nodes) {
2488 if (pnode->fSuccessfullyConnected && pnode->IsFullOutboundConn()) ++nRelevant;
2489 }
2490 }
2491 return nRelevant;
2492}
2493
2494// Return the number of peers we have over our outbound connection limit
2495// Exclude peers that are marked for disconnect, or are going to be

Callers

nothing calls this directly

Calls 1

IsFullOutboundConnMethod · 0.80

Tested by

no test coverage detected