Type Alias DefaultCoinSelectionAlgorithm

Source
pub type DefaultCoinSelectionAlgorithm = BranchAndBoundCoinSelection<SingleRandomDraw>;
Expand description

Default coin selection algorithm used by TxBuilder if not overridden

Aliased Type§

struct DefaultCoinSelectionAlgorithm { /* private fields */ }

Implementations

Source§

impl<Cs> BranchAndBoundCoinSelection<Cs>

Source

pub fn new(size_of_change: u64, fallback_algorithm: Cs) -> Self

Create new instance with a target size_of_change and fallback_algorithm.

Trait Implementations

Source§

impl<Cs: Clone> Clone for BranchAndBoundCoinSelection<Cs>

Source§

fn clone(&self) -> BranchAndBoundCoinSelection<Cs>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Cs: CoinSelectionAlgorithm> CoinSelectionAlgorithm for BranchAndBoundCoinSelection<Cs>

Source§

fn coin_select<R: RngCore>( &self, required_utxos: Vec<WeightedUtxo>, optional_utxos: Vec<WeightedUtxo>, fee_rate: FeeRate, target_amount: Amount, drain_script: &Script, rand: &mut R, ) -> Result<CoinSelectionResult, InsufficientFunds>

Perform the coin selection Read more
Source§

impl<Cs: Debug> Debug for BranchAndBoundCoinSelection<Cs>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Cs: Default> Default for BranchAndBoundCoinSelection<Cs>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more