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:
@@ -565,7 +565,13 @@ static UniValue setban(const JSONRPCRequest& request)
|
||||
if (request.params[3].isTrue())
|
||||
absolute = true;
|
||||
|
||||
isSubnet ? g_connman->Ban(subNet, BanReasonManuallyAdded, banTime, absolute) : g_connman->Ban(netAddr, BanReasonManuallyAdded, banTime, absolute);
|
||||
if (isSubnet) {
|
||||
g_connman->Ban(subNet, BanReasonManuallyAdded, banTime, absolute);
|
||||
g_connman->DisconnectNode(subNet);
|
||||
} else {
|
||||
g_connman->Ban(netAddr, BanReasonManuallyAdded, banTime, absolute);
|
||||
g_connman->DisconnectNode(netAddr);
|
||||
}
|
||||
}
|
||||
else if(strCommand == "remove")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user