@@ -41,7 +41,6 @@ CAmount maxTxFee = DEFAULT_TRANSACTION_MAXFEE;
41
41
unsigned int nTxConfirmTarget = DEFAULT_TX_CONFIRM_TARGET;
42
42
bool bSpendZeroConfChange = DEFAULT_SPEND_ZEROCONF_CHANGE;
43
43
bool fSendFreeTransactions = DEFAULT_SEND_FREE_TRANSACTIONS;
44
- bool fPayAtLeastCustomFee = false ;
45
44
46
45
/* *
47
46
* 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
2017
2016
}
2018
2017
2019
2018
CAmount nFeeNeeded = GetMinimumFee (nBytes, nTxConfirmTarget, mempool);
2019
+ if (coinControl && nFeeNeeded > 0 && coinControl->nMinimumTotalFee > nFeeNeeded) {
2020
+ nFeeNeeded = coinControl->nMinimumTotalFee ;
2021
+ }
2020
2022
2021
2023
// If we made it here and we aren't even able to meet the relay fee on the next pass, give up
2022
2024
// because we must be at the maximum allowed fee.
@@ -2112,9 +2114,6 @@ CAmount CWallet::GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarge
2112
2114
{
2113
2115
// payTxFee is user-set "I want to pay this much"
2114
2116
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 ();
2118
2117
// User didn't set: use -txconfirmtarget to estimate...
2119
2118
if (nFeeNeeded == 0 ) {
2120
2119
int estimateFoundTarget = nConfirmTarget;
0 commit comments