mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01: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:
@@ -1677,7 +1677,7 @@ void CConnman::ProcessOneShot()
|
||||
void CConnman::ThreadOpenConnections()
|
||||
{
|
||||
// Connect to specific addresses
|
||||
if (gArgs.IsArgSet("-connect") && gArgs.GetArgs("-connect").size() > 0)
|
||||
if (gArgs.IsArgSet("-connect"))
|
||||
{
|
||||
for (int64_t nLoop = 0;; nLoop++)
|
||||
{
|
||||
@@ -1903,8 +1903,7 @@ void CConnman::ThreadOpenAddedConnections()
|
||||
{
|
||||
{
|
||||
LOCK(cs_vAddedNodes);
|
||||
if (gArgs.IsArgSet("-addnode"))
|
||||
vAddedNodes = gArgs.GetArgs("-addnode");
|
||||
vAddedNodes = gArgs.GetArgs("-addnode");
|
||||
}
|
||||
|
||||
while (true)
|
||||
|
||||
Reference in New Issue
Block a user