mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Move maxTxFee initialization to init.cpp
This commit is contained in:
parent
1a6036978e
commit
dfbf117bbb
2 changed files with 16 additions and 15 deletions
|
|
@ -127,21 +127,6 @@ bool WalletInit::ParameterInteraction() const
|
|||
InitWarning(AmountHighWarn("-minrelaytxfee") + " " +
|
||||
_("The wallet will avoid paying less than the minimum relay fee."));
|
||||
|
||||
if (gArgs.IsArgSet("-maxtxfee"))
|
||||
{
|
||||
CAmount nMaxFee = 0;
|
||||
if (!ParseMoney(gArgs.GetArg("-maxtxfee", ""), nMaxFee))
|
||||
return InitError(AmountErrMsg("maxtxfee", gArgs.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)"),
|
||||
gArgs.GetArg("-maxtxfee", ""), ::minRelayTxFee.ToString()));
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue