Restore previous `-maxtxfee` bound
And warn on the new bound. Fixes #6577.
This commit is contained in:
parent
f512291ff2
commit
23a680a05f
|
@ -36,10 +36,11 @@ RPC Changes
|
||||||
Changes to Transaction Fee Selection
|
Changes to Transaction Fee Selection
|
||||||
------------------------------------
|
------------------------------------
|
||||||
|
|
||||||
- The `-sendfreetransactions` option has been removed. This option used to
|
- The `-mintxfee` and `-sendfreetransactions` options have been removed. These
|
||||||
instruct the wallet's legacy transaction creation APIs (`sendtoaddress`,
|
options used to instruct the wallet's legacy transaction creation APIs
|
||||||
`sendmany`, and `fundrawtransaction`) to use a zero fee for "small" transactions
|
(`sendtoaddress`, `sendmany`, and `fundrawtransaction`) to increase fees to
|
||||||
that spend "old" inputs. It will now cause a warning on node startup if used.
|
this limit and to use a zero fee for "small" transactions that spend "old"
|
||||||
|
inputs, respectively. They will now cause a warning on node startup if used.
|
||||||
|
|
||||||
Changes to Block Template Construction
|
Changes to Block Template Construction
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
|
@ -57,13 +58,9 @@ Removal of Priority Estimation
|
||||||
number of blocks, and the associated `estimatepriority` RPC call, have been
|
number of blocks, and the associated `estimatepriority` RPC call, have been
|
||||||
removed. The format for `fee_estimates.dat` has also changed to no longer save
|
removed. The format for `fee_estimates.dat` has also changed to no longer save
|
||||||
these priority estimates. It will automatically be converted to the new format
|
these priority estimates. It will automatically be converted to the new format
|
||||||
which is not readable by prior versions of the software.
|
which is not readable by prior versions of the software. The `-txconfirmtarget`
|
||||||
|
config option is now obsolete and has also been removed. It will cause a
|
||||||
Removal of obsolete config options
|
warning if used.
|
||||||
----------------------------------
|
|
||||||
|
|
||||||
- The fee changes for ZIP 317 have made the `-mintxfee` and `-txconfirmtarget` config options
|
|
||||||
obsolete. They have been removed and will now cause a warning if used.
|
|
||||||
|
|
||||||
[Deprecations](https://zcash.github.io/zcash/user/deprecation.html)
|
[Deprecations](https://zcash.github.io/zcash/user/deprecation.html)
|
||||||
--------------
|
--------------
|
||||||
|
|
|
@ -6713,15 +6713,23 @@ bool CWallet::ParameterInteraction(const CChainParams& params)
|
||||||
if (mapArgs.count("-maxtxfee"))
|
if (mapArgs.count("-maxtxfee"))
|
||||||
{
|
{
|
||||||
CAmount nMaxFee = 0;
|
CAmount nMaxFee = 0;
|
||||||
|
CAmount lowMaxTxFee = CalculateConventionalFee(LOW_LOGICAL_ACTIONS);
|
||||||
if (!ParseMoney(mapArgs["-maxtxfee"], nMaxFee))
|
if (!ParseMoney(mapArgs["-maxtxfee"], nMaxFee))
|
||||||
return UIError(AmountErrMsg("maxtxfee", mapArgs["-maxtxfee"]));
|
return UIError(AmountErrMsg("maxtxfee", mapArgs["-maxtxfee"]));
|
||||||
if (nMaxFee > HIGH_MAX_TX_FEE)
|
if (nMaxFee > HIGH_MAX_TX_FEE)
|
||||||
UIWarning(_("-maxtxfee is set to a very high fee rate! Fee rates this large could be paid on a single transaction."));
|
UIWarning(_("-maxtxfee is set to a very high fee rate! Fee rates this large could be paid on a single transaction."));
|
||||||
maxTxFee = nMaxFee;
|
maxTxFee = nMaxFee;
|
||||||
if (maxTxFee < CalculateConventionalFee(LOW_LOGICAL_ACTIONS))
|
if (CFeeRate(maxTxFee, 1000) < ::minRelayTxFee)
|
||||||
{
|
{
|
||||||
return UIError(strprintf(_("Invalid amount for -maxtxfee=<amount>: '%s' (must allow for at least %d logical actions at the conventional fee)"),
|
return UIError(strprintf(_("Invalid amount for -maxtxfee=<amount>: '%s' (must be at least the minimum relay fee rate of %s to prevent stuck transactions)"),
|
||||||
mapArgs["-maxtxfee"], LOW_LOGICAL_ACTIONS));
|
mapArgs["-maxtxfee"], ::minRelayTxFee.ToString()));
|
||||||
|
}
|
||||||
|
else if (maxTxFee < lowMaxTxFee)
|
||||||
|
{
|
||||||
|
UIWarning(strprintf(_("-maxtxfee is set to a very low fee rate (%s). The recommendation is to allow for at least %d logical actions at the conventional fee, which would be %s."),
|
||||||
|
mapArgs["-maxtxfee"],
|
||||||
|
LOW_LOGICAL_ACTIONS,
|
||||||
|
DisplayMoney(lowMaxTxFee)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mapArgs.count("-txconfirmtarget")) {
|
if (mapArgs.count("-txconfirmtarget")) {
|
||||||
|
|
Loading…
Reference in New Issue