You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #20040: wallet: Refactor OutputGroups to handle fees and spending eligibility on grouping
5d45976 Rewrite OutputGroups to be clearer and to use scriptPubKeys (Andrew Chow)
f6b3052 Explicitly filter out partial groups when we don't want them (Andrew Chow)
416d74f Move OutputGroup positive only filtering into Insert (Andrew Chow)
d895e98 Move EligibleForSpending into GroupOutputs (Andrew Chow)
99b399a Move fee setting of OutputGroup to Insert (Andrew Chow)
6148a8a Move GroupOutputs into SelectCoinsMinConf (Andrew Chow)
2acad03 Remove OutputGroup non-default constructors (Andrew Chow)
Pull request description:
Even after #17458, we still deal with setting fees of an `OutputGroup` and filtering the `OutputGroup` outside of the struct. We currently make all of the `OutputGroup`s in `SelectCoins` and then copy and modify them within each `SelectCoinsMinConf` scenario. This PR changes this to constructing the `OutputGroup`s within the `SelectCoinsMinConf` so that the scenario can be taken into account during the group construction. Furthermore, setting of fees and filtering for effective value is moved into `OutputGroup::Insert` itself so that we don't add undesirable outputs to an `OutputGroup` rather than deleting them afterwards.
To facilitate fee calculation and effective value filtering during `OutputGroup::Insert`, `OutputGroup` now takes the feerates in its constructor and computes the fees and effective value for each output during `Insert`.
While removing `OutputGroup`s in accordance with the `CoinEligibilityFilter` still requires creating the `OutputGroup`s first, we can do that within the function that makes them - `GroupOutput`s.
ACKs for top commit:
Xekyo:
Code review ACK: bitcoin/bitcoin@5d45976
fjahr:
Code review ACK 5d45976
meshcollider:
Light utACK 5d45976
Tree-SHA512: 35965b6d49a87f4ebb366ec4f00aafaaf78e9282481ae2c9682b515a3a9f2cbcd3cd6e202fee29489d48fe7f3a7cede4270796f5e72bbaff76da647138fb3059
0 commit comments