Constructors

Synopses

Declared in <wallet/coinselection.h>

Construct minimal coin selection parameters with only a randomness source.

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

Parameters

Name

Description

rng_fast

Randomness source to use during coin selection.

change_output_size

Size of a change output in bytes.

change_spend_size

Size of the input spending a change output in virtual bytes.

min_change_target

Minimum change to target in the Knapsack solver and CoinGrinder.

effective_feerate

Targeted feerate of the transaction being built.

long_term_feerate

Feerate estimate for spending the change output in the future.

discard_feerate

Feerate below which spending a change output is not worthwhile.

tx_noinputs_size

Size of the transaction before inputs and change are added.

avoid_partial

Whether to spend all or none of the outputs sharing an address.

max_tx_weight

Optional maximum weight for the transaction.

Created with MrDocs