Merge pull request #2437 from michilumin/1.14.4-mintxfee

Adding startup logic where -paytxfee if lower than default, mintxfee is overridden
This commit is contained in:
Ross Nicoll 2021-08-12 20:20:38 +01:00 committed by GitHub
commit 3bf47e73f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3894,6 +3894,13 @@ bool CWallet::ParameterInteraction()
return InitError(strprintf(_("Invalid amount for -paytxfee=<amount>: '%s' (must be at least %s)"),
GetArg("-paytxfee", ""), ::minRelayTxFeeRate.ToString()));
}
// if -mintxfee is not set, then a lower payTxFee overrides minTxFee
if (!IsArgSet("-mintxfee") && payTxFee < CWallet::minTxFee)
{
LogPrintf("%s: parameter interaction: -paytxfee=%s -> setting -mintxfee=%s\n", __func__, GetArg("-paytxfee",""), GetArg("-paytxfee",""));
CWallet:minTxFee = CFeeRate(nFeePerK,1000);
}
}
if (IsArgSet("-maxtxfee"))
{