diff options
author | Alex Morcos <morcos@chaincode.com> | 2017-06-28 17:23:46 -0400 |
---|---|---|
committer | Alex Morcos <morcos@chaincode.com> | 2017-07-14 23:10:58 -0400 |
commit | 03ee70116189bb358e7c6224ba0ecb745e8161c2 (patch) | |
tree | da101ee895880747adc65a5d2d0d439613ce631a /src/wallet/coincontrol.h | |
parent | ecd81dfa3cae4cc1ae3638becfbefc76829ada04 (diff) |
Refactor to use CoinControl in GetMinimumFee and FeeBumper
Improve parameter precedence in coin_control
Diffstat (limited to 'src/wallet/coincontrol.h')
-rw-r--r-- | src/wallet/coincontrol.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/wallet/coincontrol.h b/src/wallet/coincontrol.h index bdd01bec12..40c8b764b9 100644 --- a/src/wallet/coincontrol.h +++ b/src/wallet/coincontrol.h @@ -10,6 +10,8 @@ #include "primitives/transaction.h" #include "wallet/wallet.h" +#include <boost/optional.hpp> + /** Coin Control Features. */ class CCoinControl { @@ -19,12 +21,12 @@ public: bool fAllowOtherInputs; //! Includes watch only addresses which match the ISMINE_WATCH_SOLVABLE criteria bool fAllowWatchOnly; - //! Override estimated feerate + //! Override automatic min/max checks on fee, m_feerate must be set if true bool fOverrideFeeRate; - //! Feerate to use if overrideFeeRate is true - CFeeRate nFeeRate; - //! Override the default confirmation target, 0 = use default - int nConfirmTarget; + //! Override the default payTxFee if set + boost::optional<CFeeRate> m_feerate; + //! Override the default confirmation target if set + boost::optional<unsigned int> m_confirm_target; //! Signal BIP-125 replace by fee. bool signalRbf; //! Fee estimation mode to control arguments to estimateSmartFee @@ -41,9 +43,9 @@ public: fAllowOtherInputs = false; fAllowWatchOnly = false; setSelected.clear(); - nFeeRate = CFeeRate(0); + m_feerate = boost::none; fOverrideFeeRate = false; - nConfirmTarget = 0; + m_confirm_target = boost::none; signalRbf = fWalletRbf; m_fee_mode = FeeEstimateMode::UNSET; } |