aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.cpp
diff options
context:
space:
mode:
authorCozz Lovan <cozzlovan@yahoo.com>2014-11-02 00:14:47 +0100
committerCozz Lovan <cozzlovan@yahoo.com>2014-11-19 16:04:53 +0100
commitc1c9d5b415fda7d1310c23857e57d98ac14c3063 (patch)
tree8d56d76ed4b19a0a5689a5ec5c866c489ed62c78 /src/wallet.cpp
parente7876b297901a4b49daafc9ccd2b5c34a6214039 (diff)
[Qt] Add Smartfee to GUI
Diffstat (limited to 'src/wallet.cpp')
-rw-r--r--src/wallet.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 2d59506bab..5aea9881cd 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -28,7 +28,7 @@ using namespace std;
CFeeRate payTxFee(DEFAULT_TRANSACTION_FEE);
unsigned int nTxConfirmTarget = 1;
bool bSpendZeroConfChange = true;
-bool fSendFreeTransactions = true;
+bool fSendFreeTransactions = false;
bool fPayAtLeastCustomFee = true;
/**
@@ -1384,10 +1384,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
{
LOCK2(cs_main, cs_wallet);
{
- if (fPayAtLeastCustomFee)
- nFeeRet = payTxFee.GetFeePerK();
- else
- nFeeRet = 0;
+ nFeeRet = 0;
while (true)
{
txNew.vin.clear();
@@ -1636,6 +1633,9 @@ CAmount CWallet::GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarge
// prevent user from paying a non-sense fee (like 1 satoshi): 0 < fee < minRelayFee
if (nFeeNeeded > 0 && nFeeNeeded < ::minRelayTxFee.GetFee(nTxBytes))
nFeeNeeded = ::minRelayTxFee.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)
nFeeNeeded = pool.estimateFee(nConfirmTarget).GetFee(nTxBytes);