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

Method DisconnectNode

src/net.cpp:3888–3899  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3886}
3887
3888bool CConnman::DisconnectNode(std::string_view strNode)
3889{
3890 LOCK(m_nodes_mutex);
3891 auto it = std::ranges::find_if(m_nodes, [&strNode](CNode* node) { return node->m_addr_name == strNode; });
3892 if (it != m_nodes.end()) {
3893 CNode* node{*it};
3894 LogDebug(BCLog::NET, "disconnect by address%s match, %s", (fLogIPs ? strprintf("=%s", strNode) : ""), node->DisconnectMsg());
3895 node->fDisconnect = true;
3896 return true;
3897 }
3898 return false;
3899}
3900
3901bool CConnman::DisconnectNode(const CSubNet& subnet)
3902{

Callers 6

connman.cppFile · 0.80
disconnectnodeFunction · 0.80
setbanFunction · 0.80
disconnectByAddressMethod · 0.80
disconnectByIdMethod · 0.80

Calls 6

DisconnectMsgMethod · 0.80
GetIdMethod · 0.80
CSubNetClass · 0.70
endMethod · 0.45
MatchMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected