diff options
author | Andrew Chow <achow101-github@achow101.com> | 2020-08-31 15:30:51 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2020-09-29 14:25:21 -0400 |
commit | 6148a8acda5e594bb9b3b2d989056f9e03ddbdbd (patch) | |
tree | 2ab4579b18956238a978f63802dc6c6839a44ef2 /src/wallet/wallet.h | |
parent | 2acad036575ec998f8bbe4f10f6206b1c8ad3d23 (diff) | |
download | bitcoin-6148a8acda5e594bb9b3b2d989056f9e03ddbdbd.tar.xz |
Move GroupOutputs into SelectCoinsMinConf
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r-- | src/wallet/wallet.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 169f266980..69bafd2e88 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -610,8 +610,16 @@ struct CoinSelectionParams size_t tx_noinputs_size = 0; //! Indicate that we are subtracting the fee from outputs bool m_subtract_fee_outputs = false; - - CoinSelectionParams(bool use_bnb, size_t change_output_size, size_t change_spend_size, CFeeRate effective_fee, size_t tx_noinputs_size) : use_bnb(use_bnb), change_output_size(change_output_size), change_spend_size(change_spend_size), effective_fee(effective_fee), tx_noinputs_size(tx_noinputs_size) {} + bool m_avoid_partial_spends = false; + + CoinSelectionParams(bool use_bnb, size_t change_output_size, size_t change_spend_size, CFeeRate effective_fee, size_t tx_noinputs_size, bool avoid_partial) : + use_bnb(use_bnb), + change_output_size(change_output_size), + change_spend_size(change_spend_size), + effective_fee(effective_fee), + tx_noinputs_size(tx_noinputs_size), + m_avoid_partial_spends(avoid_partial) + {} CoinSelectionParams() {} }; @@ -824,7 +832,7 @@ public: * completion the coin set and corresponding actual target value is * assembled */ - bool SelectCoinsMinConf(const CAmount& nTargetValue, const CoinEligibilityFilter& eligibility_filter, std::vector<OutputGroup> groups, + bool SelectCoinsMinConf(const CAmount& nTargetValue, const CoinEligibilityFilter& eligibility_filter, std::vector<COutput> coins, std::set<CInputCoin>& setCoinsRet, CAmount& nValueRet, const CoinSelectionParams& coin_selection_params, bool& bnb_used) const; bool IsSpent(const uint256& hash, unsigned int n) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); |