pub struct BranchAndBoundCoinSelection<Cs = SingleRandomDraw> { /* private fields */ }
Expand description
Branch and bound coin selection
Code adapted from Bitcoin Core’s implementation and from Mark Erhardt Master’s Thesis: http://murch.one/wp-content/uploads/2016/11/erhardt2016coinselection.pdf
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
Source§impl<Cs: Debug> Debug for BranchAndBoundCoinSelection<Cs>
impl<Cs: Debug> Debug for BranchAndBoundCoinSelection<Cs>
Auto Trait Implementations§
impl<Cs> Freeze for BranchAndBoundCoinSelection<Cs>where
Cs: Freeze,
impl<Cs> RefUnwindSafe for BranchAndBoundCoinSelection<Cs>where
Cs: RefUnwindSafe,
impl<Cs> Send for BranchAndBoundCoinSelection<Cs>where
Cs: Send,
impl<Cs> Sync for BranchAndBoundCoinSelection<Cs>where
Cs: Sync,
impl<Cs> Unpin for BranchAndBoundCoinSelection<Cs>where
Cs: Unpin,
impl<Cs> UnwindSafe for BranchAndBoundCoinSelection<Cs>where
Cs: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more