wallet::CoinGrinder

Select coins using the CoinGrinder deterministic search algorithm.

Synopsis

Declared in <wallet/coinselection.h>

util::Result<SelectionResult>
CoinGrinder(
    std::vector<OutputGroup>& utxo_pool,
    CAmount const& selection_target,
    CAmount change_target,
    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.
change_targetThe minimum change amount to target.
max_selection_weightThe maximum allowed weight for a valid selection.