wallet::SelectCoinsBnB

Select coins using the Branch and Bound algorithm to find a changeless solution.

Synopsis

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);

Return Value

If successful, a valid SelectionResult, otherwise util::Error.

Parameters

NameDescription
utxo_poolThe output groups eligible for selection.
selection_targetThe target value to select for.
cost_of_changeThe cost of creating and later spending a change output.
max_selection_weightThe maximum allowed weight for a valid selection.