diff options
| author | michilumin <[email protected]> | 2021-08-06 18:17:14 -0600 |
|---|---|---|
| committer | michilumin <[email protected]> | 2021-08-11 13:44:29 -0600 |
| commit | 57303f1c0656817c0b80f20211423e50b9698a1b (patch) | |
| tree | 44de58e9d2055981629292dbecec4979510b08ae /src/wallet/wallet.cpp | |
| parent | Merge pull request #2439 from rnicoll/1.14.4-dust-limit-type-alt (diff) | |
| download | discoin-57303f1c0656817c0b80f20211423e50b9698a1b.tar.xz discoin-57303f1c0656817c0b80f20211423e50b9698a1b.zip | |
Adding startup logic where -paytxfee if lower than default, implies -mintxfee is also lowered.
Diffstat (limited to 'src/wallet/wallet.cpp')
| -rw-r--r-- | src/wallet/wallet.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index d9187e383..9ad4fb7f0 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -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")) { |