Issue Details

Number
26466
Title
Update BnB upper bound to use `min_viable_change`
Description
**Context**: `SelectCoinsBnB` uses `cost_of_change` as the upper bound for the search of changeless solution. However when building a tx the actual range for dropping change is determined by `min_viable_change` and `change_fee` (see `SelectionResult::GetChange`). ``` min_viable_change = std::max(change_spend_fee + 1, dust); cost_of_change = change_spend_fee + change_fee; ``` That means that BnB forgoes some of the changeless solutions in cases when dust threshold is higher than `change_spend_fee`. **Proposal**: Update BnB upper bound to be consistent with tx building, i.e. it should use exactly the same threshold for when the change is viable.
URL
https://github.com/bitcoin/bitcoin/issue/26466
Closed by
Back to List