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.