mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
net: Split resolving out of CSubNet
This commit is contained in:
@@ -500,7 +500,7 @@ UniValue setban(const UniValue& params, bool fHelp)
|
||||
netAddr = resolved;
|
||||
}
|
||||
else
|
||||
subNet = CSubNet(params[0].get_str());
|
||||
LookupSubNet(params[0].get_str().c_str(), subNet);
|
||||
|
||||
if (! (isSubnet ? subNet.IsValid() : netAddr.IsValid()) )
|
||||
throw JSONRPCError(RPC_CLIENT_NODE_ALREADY_ADDED, "Error: Invalid IP/Subnet");
|
||||
|
||||
Reference in New Issue
Block a user