net: Split resolving out of CSubNet

This commit is contained in:
Cory Fields
2016-05-31 15:50:24 -04:00
parent f96c7c4d91
commit b6c3ff3dae
7 changed files with 153 additions and 115 deletions

View File

@@ -1083,7 +1083,8 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
if (mapArgs.count("-whitelist")) {
BOOST_FOREACH(const std::string& net, mapMultiArgs["-whitelist"]) {
CSubNet subnet(net);
CSubNet subnet;
LookupSubNet(net.c_str(), subnet);
if (!subnet.IsValid())
return InitError(strprintf(_("Invalid netmask specified in -whitelist: '%s'"), net));
CNode::AddWhitelistedRange(subnet);