Skip to content

Commit 351f73e

Browse files
committed
Merge pull request #6125
472b4c5 Clean up parsing of bool command line args (Alex Morcos)
2 parents 2cc1372 + 472b4c5 commit 351f73e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/init.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -834,13 +834,13 @@ bool AppInit2(boost::thread_group& threadGroup)
834834
}
835835
}
836836
nTxConfirmTarget = GetArg("-txconfirmtarget", 1);
837-
bSpendZeroConfChange = GetArg("-spendzeroconfchange", true);
838-
fSendFreeTransactions = GetArg("-sendfreetransactions", false);
837+
bSpendZeroConfChange = GetBoolArg("-spendzeroconfchange", true);
838+
fSendFreeTransactions = GetBoolArg("-sendfreetransactions", false);
839839

840840
std::string strWalletFile = GetArg("-wallet", "wallet.dat");
841841
#endif // ENABLE_WALLET
842842

843-
fIsBareMultisigStd = GetArg("-permitbaremultisig", true) != 0;
843+
fIsBareMultisigStd = GetBoolArg("-permitbaremultisig", true);
844844
nMaxDatacarrierBytes = GetArg("-datacarriersize", nMaxDatacarrierBytes);
845845

846846
// ********************************************************* Step 4: application initialization: dir lock, daemonize, pidfile, debug log
@@ -955,7 +955,7 @@ bool AppInit2(boost::thread_group& threadGroup)
955955
proxyType addrProxy;
956956
bool fProxy = false;
957957
if (mapArgs.count("-proxy")) {
958-
addrProxy = proxyType(CService(mapArgs["-proxy"], 9050), GetArg("-proxyrandomize", true));
958+
addrProxy = proxyType(CService(mapArgs["-proxy"], 9050), GetBoolArg("-proxyrandomize", true));
959959
if (!addrProxy.IsValid())
960960
return InitError(strprintf(_("Invalid -proxy address: '%s'"), mapArgs["-proxy"]));
961961

@@ -972,7 +972,7 @@ bool AppInit2(boost::thread_group& threadGroup)
972972
if (!mapArgs.count("-onion"))
973973
addrOnion = addrProxy;
974974
else
975-
addrOnion = proxyType(CService(mapArgs["-onion"], 9050), GetArg("-proxyrandomize", true));
975+
addrOnion = proxyType(CService(mapArgs["-onion"], 9050), GetBoolArg("-proxyrandomize", true));
976976
if (!addrOnion.IsValid())
977977
return InitError(strprintf(_("Invalid -onion address: '%s'"), mapArgs["-onion"]));
978978
SetProxy(NET_TOR, addrOnion);

0 commit comments

Comments
 (0)