From ae9719ab87a05ca4c3293b2f8675f17b16ed5872 Mon Sep 17 00:00:00 2001 From: Alex Morcos Date: Wed, 25 Jan 2017 22:20:02 -0500 Subject: Refactor GetMinimumFee to give option of providing targetFee --- src/wallet/wallet.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/wallet/wallet.h') diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index ecc63a9a13..f95c0589d6 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -802,6 +802,11 @@ public: * and the required fee */ static CAmount GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarget, const CTxMemPool& pool); + /** + * Estimate the minimum fee considering required fee and targetFee or if 0 + * then fee estimation for nConfirmTarget + */ + static CAmount GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarget, const CTxMemPool& pool, CAmount targetFee); /** * Return the minimum required fee taking into account the * floating relay fee and user set minimum transaction fee -- cgit v1.2.3 From 0c0c63f70a5376b87508e8f1c73dcbc59c8a96ed Mon Sep 17 00:00:00 2001 From: Alex Morcos Date: Mon, 23 Jan 2017 13:15:24 -0500 Subject: Introduce WALLET_INCREMENTAL_RELAY_FEE Have wallet's default bump value be higher than the default incrementalRelayFee to future proof against changes to incremental relay fee. Only applies when not setting the fee rate directly. --- src/wallet/wallet.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/wallet/wallet.h') diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index f95c0589d6..764a7aa268 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -48,6 +48,8 @@ static const CAmount DEFAULT_TRANSACTION_FEE = 0; static const CAmount DEFAULT_FALLBACK_FEE = 20000; //! -mintxfee default static const CAmount DEFAULT_TRANSACTION_MINFEE = 1000; +//! minimum recommended increment for BIP 125 replacement txs +static const CAmount WALLET_INCREMENTAL_RELAY_FEE = 5000; //! target minimum change amount static const CAmount MIN_CHANGE = CENT; //! final minimum change amount after paying for fees -- cgit v1.2.3