MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / GetNodeCount

Method GetNodeCount

src/net.cpp:2529–2543  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2527}
2528
2529size_t CConnman::GetNodeCount(NumConnections flags)
2530{
2531 LOCK(cs_vNodes);
2532 if (flags == CConnman::CONNECTIONS_ALL) // Shortcut if we want total
2533 return vNodes.size();
2534
2535 int nNum = 0;
2536 for (const auto& pnode : vNodes) {
2537 if (flags & (pnode->fInbound ? CONNECTIONS_IN : CONNECTIONS_OUT)) {
2538 nNum++;
2539 }
2540 }
2541
2542 return nNum;
2543}
2544
2545void CConnman::GetNodeStats(std::vector<CNodeStats>& vstats)
2546{

Callers 4

getblocktemplateFunction · 0.80
getconnectioncountFunction · 0.80
getnetworkinfoFunction · 0.80
getNodeCountMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected