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: u64,
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: u64, 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