| 1903 | } |
| 1904 | |
| 1905 | int CConnman::GetExtraBlockRelayCount() const |
| 1906 | { |
| 1907 | int block_relay_peers = 0; |
| 1908 | { |
| 1909 | LOCK(m_nodes_mutex); |
| 1910 | for (const CNode* pnode : m_nodes) { |
| 1911 | if (pnode->fSuccessfullyConnected && !pnode->fDisconnect && pnode->IsBlockOnlyConn()) { |
| 1912 | ++block_relay_peers; |
| 1913 | } |
| 1914 | } |
| 1915 | } |
| 1916 | return std::max(block_relay_peers - m_max_outbound_block_relay, 0); |
| 1917 | } |
| 1918 | |
| 1919 | void CConnman::ThreadOpenConnections(const std::vector<std::string> connect) |
| 1920 | { |
no test coverage detected