Seeking to make the CoinControl options less confusing/redundant.
It should have no functional changes.
The too long to read technical description; remove m_add_inputs, we can use the already existent fAllowOtherInputs flag.
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
CoinControlinternal and external 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
CoinControlselected outpoints to the selection result (while they passed all theAvailableCoinschecks and are available in the 'vCoins' vector).
Changes
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 internal and external coins into 'vCoins' vector if they were manually selected by the user.
——————————————————————————————————
Just as an extra note: On top of this, I’m working on unifying/untangling further the coin filtering and selection processes so we have less duplicate functionality in both processes.