From 0ed9675be4a28b6240e10c0d3fdb81373bd56bbc Mon Sep 17 00:00:00 2001 From: Cozz Lovan Date: Sun, 2 Nov 2014 00:43:31 +0100 Subject: [Wallet] Add global boolean whether to send free transactions (default=true) --- src/wallet.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/wallet.cpp') diff --git a/src/wallet.cpp b/src/wallet.cpp index ec439c5aa..1b8e387e4 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 >& 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; -- cgit v1.2.3