MCPcopy Create free account
hub / github.com/ElementsProject/elements / DisconnectNode

Method DisconnectNode

src/net.cpp:2891–2900  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2889}
2890
2891bool CConnman::DisconnectNode(const std::string& strNode)
2892{
2893 LOCK(m_nodes_mutex);
2894 if (CNode* pnode = FindNode(strNode)) {
2895 LogPrint(BCLog::NET, "disconnect by address%s matched peer=%d; disconnecting\n", (fLogIPs ? strprintf("=%s", strNode) : ""), pnode->GetId());
2896 pnode->fDisconnect = true;
2897 return true;
2898 }
2899 return false;
2900}
2901
2902bool CConnman::DisconnectNode(const CSubNet& subnet)
2903{

Callers 6

FUZZ_TARGET_INITFunction · 0.80
disconnectnodeFunction · 0.80
setbanFunction · 0.80
disconnectByAddressMethod · 0.80
disconnectByIdMethod · 0.80

Calls 4

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

Tested by 1

FUZZ_TARGET_INITFunction · 0.64