aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCozz Lovan <cozzlovan@yahoo.com>2014-11-02 00:47:39 +0100
committerCozz Lovan <cozzlovan@yahoo.com>2014-11-19 16:04:53 +0100
commited3e5e468c5b7973d71efe51c90c3a301d570e27 (patch)
tree768af625bf6637f7685dda3abd78fcc75f7b6e3d /src
parent0ed9675be4a28b6240e10c0d3fdb81373bd56bbc (diff)
[Wallet] Add global boolean whether to pay at least the custom fee (default=true)
Diffstat (limited to 'src')
-rw-r--r--src/wallet.cpp6
-rw-r--r--src/wallet.h1
2 files changed, 6 insertions, 1 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 1b8e387e44..f1cf104974 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -29,6 +29,7 @@ CFeeRate payTxFee(DEFAULT_TRANSACTION_FEE);
unsigned int nTxConfirmTarget = 1;
bool bSpendZeroConfChange = true;
bool fSendFreeTransactions = true;
+bool fPayAtLeastCustomFee = true;
/**
* Fees smaller than this (in satoshi) are considered zero fee (for transaction creation)
@@ -1383,7 +1384,10 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
{
LOCK2(cs_main, cs_wallet);
{
- nFeeRet = payTxFee.GetFeePerK();
+ if (fPayAtLeastCustomFee)
+ nFeeRet = payTxFee.GetFeePerK();
+ else
+ nFeeRet = 0;
while (true)
{
txNew.vin.clear();
diff --git a/src/wallet.h b/src/wallet.h
index ebe52d4ab9..0244ce2368 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -33,6 +33,7 @@ extern CFeeRate payTxFee;
extern unsigned int nTxConfirmTarget;
extern bool bSpendZeroConfChange;
extern bool fSendFreeTransactions;
+extern bool fPayAtLeastCustomFee;
//! -paytxfee default
static const CAmount DEFAULT_TRANSACTION_FEE = 0;