pub type DefaultCoinSelectionAlgorithm = BranchAndBoundCoinSelection<SingleRandomDraw>;
Expand description
Default coin selection algorithm used by TxBuilder
if not
overridden
Aliased Type§
struct DefaultCoinSelectionAlgorithm { /* private fields */ }
Implementations
Trait Implementations
Source§impl<Cs: Clone> Clone for BranchAndBoundCoinSelection<Cs>
impl<Cs: Clone> Clone for BranchAndBoundCoinSelection<Cs>
Source§fn clone(&self) -> BranchAndBoundCoinSelection<Cs>
fn clone(&self) -> BranchAndBoundCoinSelection<Cs>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<Cs: CoinSelectionAlgorithm> CoinSelectionAlgorithm for BranchAndBoundCoinSelection<Cs>
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>
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