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

Function ProtectOutboundConnections

src/node/eviction.cpp:96–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96void ProtectOutboundConnections(std::vector<NodeEvictionCandidate>& eviction_candidates)
97{
98 eviction_candidates.erase(std::remove_if(eviction_candidates.begin(), eviction_candidates.end(),
99 [](NodeEvictionCandidate const& n) {
100 return n.m_conn_type != ConnectionType::INBOUND;
101 }),
102 eviction_candidates.end());
103}
104
105void ProtectEvictionCandidatesByRatio(std::vector<NodeEvictionCandidate>& eviction_candidates)
106{

Callers 1

SelectNodeToEvictFunction · 0.85

Calls 3

eraseMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected