mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
net: Break disconnecting out of Ban()
These are separate events which need to be carried out by separate subsystems. This also cleans up some whitespace and tabs in qt to avoid getting flagged by the linter. Current behavior is preserved.
This commit is contained in:
@@ -144,6 +144,13 @@ public:
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool disconnect(const CNetAddr& net_addr) override
|
||||
{
|
||||
if (g_connman) {
|
||||
return g_connman->DisconnectNode(net_addr);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool disconnect(NodeId id) override
|
||||
{
|
||||
if (g_connman) {
|
||||
|
||||
@@ -113,7 +113,10 @@ public:
|
||||
//! Unban node.
|
||||
virtual bool unban(const CSubNet& ip) = 0;
|
||||
|
||||
//! Disconnect node.
|
||||
//! Disconnect node by address.
|
||||
virtual bool disconnect(const CNetAddr& net_addr) = 0;
|
||||
|
||||
//! Disconnect node by id.
|
||||
virtual bool disconnect(NodeId id) = 0;
|
||||
|
||||
//! Get total bytes recv.
|
||||
|
||||
Reference in New Issue
Block a user