aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.h
diff options
context:
space:
mode:
authorGregory Maxwell <greg@xiph.org>2014-12-16 01:43:40 -0800
committerWladimir J. van der Laan <laanwj@gmail.com>2014-12-23 12:12:40 +0100
commit11855c1f990a4a66f55de60a30a8898ccbf766ec (patch)
tree405d5f3f595da3a3a99c305606bbed06a6f600e0 /src/wallet.h
parent84462625975bd1a34dadc47c062a9999c6000203 (diff)
downloadbitcoin-11855c1f990a4a66f55de60a30a8898ccbf766ec.tar.xz
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. Rebased-From: aa279d613152e87ea25edfdf76c86779c0632f18 Github-Pull: #5485
Diffstat (limited to 'src/wallet.h')
-rw-r--r--src/wallet.h5
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;