@@ -708,11 +708,11 @@ void InitParameterInteraction()
708708{
709709 // when specifying an explicit binding address, you want to listen on it
710710 // even when -connect or -proxy is specified
711- if (mapArgs. count (" -bind" )) {
711+ if (IsArgSet (" -bind" )) {
712712 if (SoftSetBoolArg (" -listen" , true ))
713713 LogPrintf (" %s: parameter interaction: -bind set -> setting -listen=1\n " , __func__);
714714 }
715- if (mapArgs. count (" -whitebind" )) {
715+ if (IsArgSet (" -whitebind" )) {
716716 if (SoftSetBoolArg (" -listen" , true ))
717717 LogPrintf (" %s: parameter interaction: -whitebind set -> setting -listen=1\n " , __func__);
718718 }
@@ -725,7 +725,7 @@ void InitParameterInteraction()
725725 LogPrintf (" %s: parameter interaction: -connect set -> setting -listen=0\n " , __func__);
726726 }
727727
728- if (mapArgs. count (" -proxy" )) {
728+ if (IsArgSet (" -proxy" )) {
729729 // to protect privacy, do not listen by default if a default proxy server is specified
730730 if (SoftSetBoolArg (" -listen" , false ))
731731 LogPrintf (" %s: parameter interaction: -proxy set -> setting -listen=0\n " , __func__);
@@ -748,7 +748,7 @@ void InitParameterInteraction()
748748 LogPrintf (" %s: parameter interaction: -listen=0 -> setting -listenonion=0\n " , __func__);
749749 }
750750
751- if (mapArgs. count (" -externalip" )) {
751+ if (IsArgSet (" -externalip" )) {
752752 // if an explicit public IP is specified, do not try to find others
753753 if (SoftSetBoolArg (" -discover" , false ))
754754 LogPrintf (" %s: parameter interaction: -externalip set -> setting -discover=0\n " , __func__);
@@ -892,7 +892,7 @@ bool AppInitParameterInteraction()
892892 if (GetBoolArg (" -debugnet" , false ))
893893 InitWarning (_ (" Unsupported argument -debugnet ignored, use -debug=net." ));
894894 // Check for -socks - as this is a privacy risk to continue, exit here
895- if (mapArgs. count (" -socks" ))
895+ if (IsArgSet (" -socks" ))
896896 return InitError (_ (" Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported." ));
897897 // Check for -tor - as this is a privacy risk to continue, exit here
898898 if (GetBoolArg (" -tor" , false ))
@@ -904,7 +904,7 @@ bool AppInitParameterInteraction()
904904 if (GetBoolArg (" -whitelistalwaysrelay" , false ))
905905 InitWarning (_ (" Unsupported argument -whitelistalwaysrelay ignored, use -whitelistrelay and/or -whitelistforcerelay." ));
906906
907- if (mapArgs. count (" -blockminsize" ))
907+ if (IsArgSet (" -blockminsize" ))
908908 InitWarning (" Unsupported argument -blockminsize ignored." );
909909
910910 // Checkmempool and checkblockindex default to true in regtest mode
@@ -959,7 +959,7 @@ bool AppInitParameterInteraction()
959959 // a transaction spammer can cheaply fill blocks using
960960 // 1-satoshi-fee transactions. It should be set above the real
961961 // cost to you of processing a transaction.
962- if (mapArgs. count (" -minrelaytxfee" ))
962+ if (IsArgSet (" -minrelaytxfee" ))
963963 {
964964 CAmount n = 0 ;
965965 if (!ParseMoney (mapArgs[" -minrelaytxfee" ], n) || 0 == n)
@@ -997,7 +997,7 @@ bool AppInitParameterInteraction()
997997 nMaxTipAge = GetArg (" -maxtipage" , DEFAULT_MAX_TIP_AGE);
998998
999999 fEnableReplacement = GetBoolArg (" -mempoolreplacement" , DEFAULT_ENABLE_REPLACEMENT);
1000- if ((!fEnableReplacement ) && mapArgs. count (" -mempoolreplacement" )) {
1000+ if ((!fEnableReplacement ) && IsArgSet (" -mempoolreplacement" )) {
10011001 // Minimal effort at forwards compatibility
10021002 std::string strReplacementModeList = GetArg (" -mempoolreplacement" , " " ); // default is impossible
10031003 std::vector<std::string> vstrReplacementModes;
@@ -1291,7 +1291,7 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
12911291 uint64_t nMaxOutboundLimit = 0 ; // unlimited unless -maxuploadtarget is set
12921292 uint64_t nMaxOutboundTimeframe = MAX_UPLOAD_TIMEFRAME;
12931293
1294- if (mapArgs. count (" -maxuploadtarget" )) {
1294+ if (IsArgSet (" -maxuploadtarget" )) {
12951295 nMaxOutboundLimit = GetArg (" -maxuploadtarget" , DEFAULT_MAX_UPLOAD_TARGET)*1024 *1024 ;
12961296 }
12971297
@@ -1523,7 +1523,7 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
15231523 fHaveGenesis = true ;
15241524 }
15251525
1526- if (mapArgs. count (" -blocknotify" ))
1526+ if (IsArgSet (" -blocknotify" ))
15271527 uiInterface.NotifyBlockTip .connect (BlockNotifyCallback);
15281528
15291529 std::vector<boost::filesystem::path> vImportFiles;
0 commit comments