wallet::CoinSelectionParams::CoinSelectionParams

Constructors

Synopses

Declared in <wallet/coinselection.h>

Construct minimal coin selection parameters with only a randomness source.

CoinSelectionParams(FastRandomContext& rng_fast);
» more...

Construct coin selection parameters with fully specified fees and sizes.

CoinSelectionParams(
    FastRandomContext& rng_fast,
    int change_output_size,
    int change_spend_size,
    CAmount min_change_target,
    CFeeRate effective_feerate,
    CFeeRate long_term_feerate,
    CFeeRate discard_feerate,
    int tx_noinputs_size,
    bool avoid_partial,
    std::optional<int> max_tx_weight = std::nullopt);
» more...

Parameters

NameDescription
rng_fastRandomness source to use during coin selection.
change_output_sizeSize of a change output in bytes.
change_spend_sizeSize of the input spending a change output in virtual bytes.
min_change_targetMinimum change to target in the Knapsack solver and CoinGrinder.
effective_feerateTargeted feerate of the transaction being built.
long_term_feerateFeerate estimate for spending the change output in the future.
discard_feerateFeerate below which spending a change output is not worthwhile.
tx_noinputs_sizeSize of the transaction before inputs and change are added.
avoid_partialWhether to spend all or none of the outputs sharing an address.
max_tx_weightOptional maximum weight for the transaction.