diff options
author | Gregory Maxwell <greg@xiph.org> | 2014-12-16 01:43:40 -0800 |
---|---|---|
committer | Gregory Maxwell <greg@xiph.org> | 2014-12-19 12:05:10 -0800 |
commit | aa279d613152e87ea25edfdf76c86779c0632f18 (patch) | |
tree | 7a5b63fe5c1d55b2e52b18040a5b412757d2560d /src/wallet.h | |
parent | bf4bf40a1c8e94e766679f1c8cde75c3067cf594 (diff) |
Enforce minRelayTxFee on wallet created tx and add a maxtxfee option.
Previously the minRelayTxFee was only enforced on user specified values.
It was possible for smartfee to produce a fee below minRelayTxFee which
would just result in the transaction getting stuck because it can't be
relayed.
This also introduces a maxtxfee option which sets an absolute maximum
for any fee created by the wallet, with an intention of increasing
user confidence that the automatic fees won't burn them. This was
frequently a concern even before smartfees.
If the configured fee policy won't even allow the wallet to meet the relay
fee the transaction creation may be aborted.
Diffstat (limited to 'src/wallet.h')
-rw-r--r-- | src/wallet.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wallet.h b/src/wallet.h index 2dd2146e8c..058107edf1 100644 --- a/src/wallet.h +++ b/src/wallet.h @@ -30,6 +30,7 @@ * Settings */ extern CFeeRate payTxFee; +extern CAmount maxTxFee; extern unsigned int nTxConfirmTarget; extern bool bSpendZeroConfChange; extern bool fSendFreeTransactions; @@ -39,6 +40,10 @@ extern bool fPayAtLeastCustomFee; static const CAmount DEFAULT_TRANSACTION_FEE = 0; //! -paytxfee will warn if called with a higher fee than this amount (in satoshis) per KB static const CAmount nHighTransactionFeeWarning = 0.01 * COIN; +//! -maxtxfee default +static const CAmount DEFAULT_TRANSACTION_MAXFEE = 0.1 * COIN; +//! -maxtxfee will warn if called with a higher fee than this amount (in satoshis) +static const CAmount nHighTransactionMaxFeeWarning = 100 * nHighTransactionFeeWarning; //! Largest (in bytes) free transaction we're willing to create static const unsigned int MAX_FREE_TRANSACTION_CREATE_SIZE = 1000; |