mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
5d4597666dRewrite OutputGroups to be clearer and to use scriptPubKeys (Andrew Chow)f6b3052739Explicitly filter out partial groups when we don't want them (Andrew Chow)416d74fb16Move OutputGroup positive only filtering into Insert (Andrew Chow)d895e98b59Move EligibleForSpending into GroupOutputs (Andrew Chow)99b399aba5Move fee setting of OutputGroup to Insert (Andrew Chow)6148a8acdaMove GroupOutputs into SelectCoinsMinConf (Andrew Chow)2acad03657Remove 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:5d4597666dfjahr: Code review ACK5d4597666dmeshcollider: Light utACK5d4597666dTree-SHA512: 35965b6d49a87f4ebb366ec4f00aafaaf78e9282481ae2c9682b515a3a9f2cbcd3cd6e202fee29489d48fe7f3a7cede4270796f5e72bbaff76da647138fb3059