Select coins using the Branch and Bound algorithm to find a changeless solution.
Declared in <wallet/coinselection.h>
util::Result<SelectionResult>
SelectCoinsBnB(
std::vector<OutputGroup>& utxo_pool,
CAmount const& selection_target,
CAmount const& cost_of_change,
int max_selection_weight);
If successful, a valid SelectionResult, otherwise util::Error.
| Name | Description |
|---|---|
| utxo_pool | The output groups eligible for selection. |
| selection_target | The target value to select for. |
| cost_of_change | The cost of creating and later spending a change output. |
| max_selection_weight | The maximum allowed weight for a valid selection. |