mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Un-expose mapArgs from utils.h
This commit is contained in:
@@ -3621,8 +3621,8 @@ bool CWallet::ParameterInteraction()
|
||||
if (IsArgSet("-mintxfee"))
|
||||
{
|
||||
CAmount n = 0;
|
||||
if (!ParseMoney(mapArgs["-mintxfee"], n) || 0 == n)
|
||||
return InitError(AmountErrMsg("mintxfee", mapArgs["-mintxfee"]));
|
||||
if (!ParseMoney(GetArg("-mintxfee", ""), n) || 0 == n)
|
||||
return InitError(AmountErrMsg("mintxfee", GetArg("-mintxfee", "")));
|
||||
if (n > HIGH_TX_FEE_PER_KB)
|
||||
InitWarning(AmountHighWarn("-mintxfee") + " " +
|
||||
_("This is the minimum transaction fee you pay on every transaction."));
|
||||
@@ -3631,8 +3631,8 @@ bool CWallet::ParameterInteraction()
|
||||
if (IsArgSet("-fallbackfee"))
|
||||
{
|
||||
CAmount nFeePerK = 0;
|
||||
if (!ParseMoney(mapArgs["-fallbackfee"], nFeePerK))
|
||||
return InitError(strprintf(_("Invalid amount for -fallbackfee=<amount>: '%s'"), mapArgs["-fallbackfee"]));
|
||||
if (!ParseMoney(GetArg("-fallbackfee", ""), nFeePerK))
|
||||
return InitError(strprintf(_("Invalid amount for -fallbackfee=<amount>: '%s'"), GetArg("-fallbackfee", "")));
|
||||
if (nFeePerK > HIGH_TX_FEE_PER_KB)
|
||||
InitWarning(AmountHighWarn("-fallbackfee") + " " +
|
||||
_("This is the transaction fee you may pay when fee estimates are not available."));
|
||||
@@ -3641,8 +3641,8 @@ bool CWallet::ParameterInteraction()
|
||||
if (IsArgSet("-paytxfee"))
|
||||
{
|
||||
CAmount nFeePerK = 0;
|
||||
if (!ParseMoney(mapArgs["-paytxfee"], nFeePerK))
|
||||
return InitError(AmountErrMsg("paytxfee", mapArgs["-paytxfee"]));
|
||||
if (!ParseMoney(GetArg("-paytxfee", ""), nFeePerK))
|
||||
return InitError(AmountErrMsg("paytxfee", GetArg("-paytxfee", "")));
|
||||
if (nFeePerK > HIGH_TX_FEE_PER_KB)
|
||||
InitWarning(AmountHighWarn("-paytxfee") + " " +
|
||||
_("This is the transaction fee you will pay if you send a transaction."));
|
||||
@@ -3651,21 +3651,21 @@ bool CWallet::ParameterInteraction()
|
||||
if (payTxFee < ::minRelayTxFee)
|
||||
{
|
||||
return InitError(strprintf(_("Invalid amount for -paytxfee=<amount>: '%s' (must be at least %s)"),
|
||||
mapArgs["-paytxfee"], ::minRelayTxFee.ToString()));
|
||||
GetArg("-paytxfee", ""), ::minRelayTxFee.ToString()));
|
||||
}
|
||||
}
|
||||
if (IsArgSet("-maxtxfee"))
|
||||
{
|
||||
CAmount nMaxFee = 0;
|
||||
if (!ParseMoney(mapArgs["-maxtxfee"], nMaxFee))
|
||||
return InitError(AmountErrMsg("maxtxfee", mapArgs["-maxtxfee"]));
|
||||
if (!ParseMoney(GetArg("-maxtxfee", ""), nMaxFee))
|
||||
return InitError(AmountErrMsg("maxtxfee", GetArg("-maxtxfee", "")));
|
||||
if (nMaxFee > HIGH_MAX_TX_FEE)
|
||||
InitWarning(_("-maxtxfee is set very high! Fees this large could be paid on a single transaction."));
|
||||
maxTxFee = nMaxFee;
|
||||
if (CFeeRate(maxTxFee, 1000) < ::minRelayTxFee)
|
||||
{
|
||||
return InitError(strprintf(_("Invalid amount for -maxtxfee=<amount>: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)"),
|
||||
mapArgs["-maxtxfee"], ::minRelayTxFee.ToString()));
|
||||
GetArg("-maxtxfee", ""), ::minRelayTxFee.ToString()));
|
||||
}
|
||||
}
|
||||
nTxConfirmTarget = GetArg("-txconfirmtarget", DEFAULT_TX_CONFIRM_TARGET);
|
||||
|
||||
Reference in New Issue
Block a user