mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
Util: Remove redundant calls to gArgs.IsArgSet()
Return empty std::vector<std::string> with ArgsManager::GetArgs if nothing is set for that string
This commit is contained in:
parent
234ffc677e
commit
506b700dcb
5 changed files with 16 additions and 37 deletions
|
|
@ -196,8 +196,7 @@ static bool InitHTTPAllowList()
|
|||
LookupHost("::1", localv6, false);
|
||||
rpc_allow_subnets.push_back(CSubNet(localv4, 8)); // always allow IPv4 local subnet
|
||||
rpc_allow_subnets.push_back(CSubNet(localv6)); // always allow IPv6 localhost
|
||||
if (gArgs.IsArgSet("-rpcallowip")) {
|
||||
for (const std::string& strAllow : gArgs.GetArgs("-rpcallowip")) {
|
||||
for (const std::string& strAllow : gArgs.GetArgs("-rpcallowip")) {
|
||||
CSubNet subnet;
|
||||
LookupSubNet(strAllow.c_str(), subnet);
|
||||
if (!subnet.IsValid()) {
|
||||
|
|
@ -207,7 +206,6 @@ static bool InitHTTPAllowList()
|
|||
return false;
|
||||
}
|
||||
rpc_allow_subnets.push_back(subnet);
|
||||
}
|
||||
}
|
||||
std::string strAllowed;
|
||||
for (const CSubNet& subnet : rpc_allow_subnets)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue