aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/coincontrol.h
diff options
context:
space:
mode:
authorfurszy <matiasfurszyfer@protonmail.com>2022-05-11 11:39:54 -0300
committerfurszy <matiasfurszyfer@protonmail.com>2022-06-19 20:02:35 -0300
commit25749f1df77c78eb146978ca0485cf9f91b5ce49 (patch)
treed23906ac8af3098d3a272c777f41b4a30b2bd58a /src/wallet/coincontrol.h
parent8e7eeb5971444c0c93e9a89bbdcc3a51a19e09e9 (diff)
wallet: unify “allow/block other inputs“ concept
Seeking to make the `CoinControl` option less confusing/redundant. In #16377 the `CoinControl` flag ‘m_add_inputs’ was added to tell the coin filtering and selection process two things: - Coin Filtering: Only use the provided inputs. Skip the Rest. - Coin Selection: Search the wtxs-outputs and append all the `CoinControl` selected outpoints to the selection result (skipping all the available output checks). Nothing else. Meanwhile, in `CoinControl` we already have a flag ‘fAllowOtherInputs’ which is already saying: - Coin Filtering: Only use the provided inputs. Skip the Rest. - Coin Selection: If false, no selection process -> append all the `CoinControl` selected outpoints to the selection result (while they passed all the `AvailableCoins` checks and are available in the 'vCoins' vector). As can notice, the first point in the coin filtering process is duplicated in the two option flags. And the second one, is slightly different merely because it takes into account whether the coin is on the `AvailableCoins` vector or not. So it makes sense to merge ‘m_add_inputs’ and ‘fAllowOtherInputs’ into a single field for the coin filtering process while introduce other changes to add the missing/skipped coins into 'vCoins' vector if they were manually selected by the user (follow-up commits).
Diffstat (limited to 'src/wallet/coincontrol.h')
-rw-r--r--src/wallet/coincontrol.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/wallet/coincontrol.h b/src/wallet/coincontrol.h
index 65a5c83366..e9687de14d 100644
--- a/src/wallet/coincontrol.h
+++ b/src/wallet/coincontrol.h
@@ -33,11 +33,10 @@ public:
CTxDestination destChange = CNoDestination();
//! Override the default change type if set, ignored if destChange is set
std::optional<OutputType> m_change_type;
- //! If false, only selected inputs are used
- bool m_add_inputs = true;
//! If false, only safe inputs will be used
bool m_include_unsafe_inputs = false;
- //! If false, allows unselected inputs, but requires all selected inputs be used
+ //! If true, the selection process can add extra unselected inputs from the wallet
+ //! while requires all selected inputs be used
bool fAllowOtherInputs = false;
//! Includes watch only addresses which are solvable
bool fAllowWatchOnly = false;