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

Method GetExtraBlockRelayCount

src/net.cpp:2516–2530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2514}
2515
2516int CConnman::GetExtraBlockRelayCount() const
2517{
2518 AssertLockNotHeld(m_nodes_mutex);
2519
2520 int block_relay_peers = 0;
2521 {
2522 LOCK(m_nodes_mutex);
2523 for (const CNode* pnode : m_nodes) {
2524 if (pnode->fSuccessfullyConnected && !pnode->fDisconnect && pnode->IsBlockOnlyConn()) {
2525 ++block_relay_peers;
2526 }
2527 }
2528 }
2529 return std::max(block_relay_peers - m_max_outbound_block_relay, 0);
2530}
2531
2532std::unordered_set<Network> CConnman::GetReachableEmptyNetworks() const
2533{

Callers 1

Calls 1

IsBlockOnlyConnMethod · 0.80

Tested by

no test coverage detected