@@ -41,7 +41,6 @@ CAmount maxTxFee = DEFAULT_TRANSACTION_MAXFEE;
4141unsigned int nTxConfirmTarget = DEFAULT_TX_CONFIRM_TARGET;
4242bool bSpendZeroConfChange = DEFAULT_SPEND_ZEROCONF_CHANGE;
4343bool fSendFreeTransactions = DEFAULT_SEND_FREE_TRANSACTIONS;
44- bool fPayAtLeastCustomFee = false ;
4544
4645/* *
4746 * Fees smaller than this (in satoshi) are considered zero fee (for transaction creation)
@@ -2017,6 +2016,9 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
20172016 }
20182017
20192018 CAmount nFeeNeeded = GetMinimumFee (nBytes, nTxConfirmTarget, mempool);
2019+ if (coinControl && nFeeNeeded > 0 && coinControl->nMinimumTotalFee > nFeeNeeded) {
2020+ nFeeNeeded = coinControl->nMinimumTotalFee ;
2021+ }
20202022
20212023 // If we made it here and we aren't even able to meet the relay fee on the next pass, give up
20222024 // because we must be at the maximum allowed fee.
@@ -2112,9 +2114,6 @@ CAmount CWallet::GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarge
21122114{
21132115 // payTxFee is user-set "I want to pay this much"
21142116 CAmount nFeeNeeded = payTxFee.GetFee (nTxBytes);
2115- // user selected total at least (default=true)
2116- if (fPayAtLeastCustomFee && nFeeNeeded > 0 && nFeeNeeded < payTxFee.GetFeePerK ())
2117- nFeeNeeded = payTxFee.GetFeePerK ();
21182117 // User didn't set: use -txconfirmtarget to estimate...
21192118 if (nFeeNeeded == 0 ) {
21202119 int estimateFoundTarget = nConfirmTarget;
0 commit comments