pub struct LargestFirstCoinSelection;
Expand description
Simple and dumb coin selection
This coin selection algorithm sorts the available UTXOs by value and then picks them starting from the largest ones until the required amount is reached.
Trait Implementations§
Source§impl Clone for LargestFirstCoinSelection
impl Clone for LargestFirstCoinSelection
Source§fn clone(&self) -> LargestFirstCoinSelection
fn clone(&self) -> LargestFirstCoinSelection
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 CoinSelectionAlgorithm for LargestFirstCoinSelection
impl CoinSelectionAlgorithm for LargestFirstCoinSelection
Source§fn coin_select<R: RngCore>(
&self,
required_utxos: Vec<WeightedUtxo>,
optional_utxos: Vec<WeightedUtxo>,
fee_rate: FeeRate,
target_amount: Amount,
drain_script: &Script,
_: &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, _: &mut R, ) -> Result<CoinSelectionResult, InsufficientFunds>
Perform the coin selection Read more
Source§impl Debug for LargestFirstCoinSelection
impl Debug for LargestFirstCoinSelection
Source§impl Default for LargestFirstCoinSelection
impl Default for LargestFirstCoinSelection
Source§fn default() -> LargestFirstCoinSelection
fn default() -> LargestFirstCoinSelection
Returns the “default value” for a type. Read more
impl Copy for LargestFirstCoinSelection
Auto Trait Implementations§
impl Freeze for LargestFirstCoinSelection
impl RefUnwindSafe for LargestFirstCoinSelection
impl Send for LargestFirstCoinSelection
impl Sync for LargestFirstCoinSelection
impl Unpin for LargestFirstCoinSelection
impl UnwindSafe for LargestFirstCoinSelection
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