diff options
author | Alex Morcos <morcos@chaincode.com> | 2017-01-05 09:10:08 -0500 |
---|---|---|
committer | Alex Morcos <morcos@chaincode.com> | 2017-01-06 10:12:05 -0500 |
commit | 42f5ce40931402aaa395ef2959deb64e9a9fff02 (patch) | |
tree | 650bad83761a48cafdeed51a047fb3a63b559a3c /src/wallet/wallet.h | |
parent | f646275b90b1de93bc62b4c4d045d75ac0b96eee (diff) |
Try to reduce change output to make needed fee in CreateTransaction
Once we've picked coins and dummy-signed the transaction to calculate fee, if we don't have sufficient fee, then try to meet the fee by reducing change before resorting to picking new coins.
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r-- | src/wallet/wallet.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 1d1f84ebb9..b9fa6bb24b 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -48,8 +48,10 @@ static const CAmount DEFAULT_TRANSACTION_FEE = 0; static const CAmount DEFAULT_FALLBACK_FEE = 20000; //! -mintxfee default static const CAmount DEFAULT_TRANSACTION_MINFEE = 1000; -//! minimum change amount +//! target minimum change amount static const CAmount MIN_CHANGE = CENT; +//! final minimum change amount after paying for fees +static const CAmount MIN_FINAL_CHANGE = MIN_CHANGE/2; //! Default for -spendzeroconfchange static const bool DEFAULT_SPEND_ZEROCONF_CHANGE = true; //! Default for -sendfreetransactions |