mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
net: Split resolving out of CNetAddr
This commit is contained in:
@@ -494,8 +494,11 @@ UniValue setban(const UniValue& params, bool fHelp)
|
||||
if (params[0].get_str().find("/") != string::npos)
|
||||
isSubnet = true;
|
||||
|
||||
if (!isSubnet)
|
||||
netAddr = CNetAddr(params[0].get_str());
|
||||
if (!isSubnet) {
|
||||
CNetAddr resolved;
|
||||
LookupHost(params[0].get_str().c_str(), resolved, false);
|
||||
netAddr = resolved;
|
||||
}
|
||||
else
|
||||
subNet = CSubNet(params[0].get_str());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user