diff options
author | Cozz Lovan <cozzlovan@yahoo.com> | 2014-11-02 00:43:31 +0100 |
---|---|---|
committer | Cozz Lovan <cozzlovan@yahoo.com> | 2014-11-19 16:04:53 +0100 |
commit | 0ed9675be4a28b6240e10c0d3fdb81373bd56bbc (patch) | |
tree | 3c0738c8b4f6eb9bf97ffb56ec2634c87ab01620 /src | |
parent | 8c4185338001b8ba3ef247b09fb63afb65961c10 (diff) |
[Wallet] Add global boolean whether to send free transactions (default=true)
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet.cpp | 3 | ||||
-rw-r--r-- | src/wallet.h | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp index ec439c5aad..1b8e387e44 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -28,6 +28,7 @@ using namespace std; CFeeRate payTxFee(DEFAULT_TRANSACTION_FEE); unsigned int nTxConfirmTarget = 1; bool bSpendZeroConfChange = true; +bool fSendFreeTransactions = true; /** * Fees smaller than this (in satoshi) are considered zero fee (for transaction creation) @@ -1502,7 +1503,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend, break; // Done, enough fee included. // Too big to send for free? Include more fee and try again: - if (nBytes > MAX_FREE_TRANSACTION_CREATE_SIZE) + if (!fSendFreeTransactions || nBytes > MAX_FREE_TRANSACTION_CREATE_SIZE) { nFeeRet = nFeeNeeded; continue; diff --git a/src/wallet.h b/src/wallet.h index b692ad056b..ebe52d4ab9 100644 --- a/src/wallet.h +++ b/src/wallet.h @@ -32,6 +32,7 @@ extern CFeeRate payTxFee; extern unsigned int nTxConfirmTarget; extern bool bSpendZeroConfChange; +extern bool fSendFreeTransactions; //! -paytxfee default static const CAmount DEFAULT_TRANSACTION_FEE = 0; |