aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-12-01 09:58:54 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2015-12-01 09:59:03 +0100
commit9490bd71bdb41669de7d3c2669241cabf307bb9b (patch)
tree65ecaf53ec8c47681f29274c4b28e89768b7b488 /src/wallet
parenteb3d1b348773bb6df96020eeb9a7a144aa04ce71 (diff)
parentff723da6f67d6d597c0118162fb709e962b1e2fe (diff)
Merge pull request #7096
ff723da [Qt] improve minimum absolute fee option - Only display the minimum absolute fee control if CoinControl is enabled (Jonas Schnelli) 31b508a [Qt] make use of the nMinimumTotalFee (absolute) in coincontrols fee calculation (Jonas Schnelli) 80462dd [Qt] use ASYMP_UTF8 (≈) whenever we show a fee that is not absolute (Jonas Schnelli) ecc7c82 Move fPayAtLeastCustomFee function to CC (Pieter Wuille)
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet.cpp7
-rw-r--r--src/wallet/wallet.h1
2 files changed, 3 insertions, 5 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 78c9357842..30b9869be0 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -41,7 +41,6 @@ CAmount maxTxFee = DEFAULT_TRANSACTION_MAXFEE;
unsigned int nTxConfirmTarget = DEFAULT_TX_CONFIRM_TARGET;
bool bSpendZeroConfChange = DEFAULT_SPEND_ZEROCONF_CHANGE;
bool fSendFreeTransactions = DEFAULT_SEND_FREE_TRANSACTIONS;
-bool fPayAtLeastCustomFee = false;
/**
* Fees smaller than this (in satoshi) are considered zero fee (for transaction creation)
@@ -2096,6 +2095,9 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
}
CAmount nFeeNeeded = GetMinimumFee(nBytes, nTxConfirmTarget, mempool);
+ if (coinControl && nFeeNeeded > 0 && coinControl->nMinimumTotalFee > nFeeNeeded) {
+ nFeeNeeded = coinControl->nMinimumTotalFee;
+ }
// If we made it here and we aren't even able to meet the relay fee on the next pass, give up
// because we must be at the maximum allowed fee.
@@ -2191,9 +2193,6 @@ CAmount CWallet::GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarge
{
// payTxFee is user-set "I want to pay this much"
CAmount nFeeNeeded = payTxFee.GetFee(nTxBytes);
- // user selected total at least (default=true)
- if (fPayAtLeastCustomFee && nFeeNeeded > 0 && nFeeNeeded < payTxFee.GetFeePerK())
- nFeeNeeded = payTxFee.GetFeePerK();
// User didn't set: use -txconfirmtarget to estimate...
if (nFeeNeeded == 0) {
int estimateFoundTarget = nConfirmTarget;
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index bc6e40ab98..859788893c 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -35,7 +35,6 @@ extern CAmount maxTxFee;
extern unsigned int nTxConfirmTarget;
extern bool bSpendZeroConfChange;
extern bool fSendFreeTransactions;
-extern bool fPayAtLeastCustomFee;
static const unsigned int DEFAULT_KEYPOOL_SIZE = 100;
//! -paytxfee default