pub struct OldestFirstCoinSelection;
Expand description
OldestFirstCoinSelection always picks the utxo with the smallest blockheight to add to the selected coins next
This coin selection algorithm sorts the available UTXOs by blockheight and then picks them starting from the oldest ones until the required amount is reached.
Trait Implementations§
source§impl Clone for OldestFirstCoinSelection
impl Clone for OldestFirstCoinSelection
source§fn clone(&self) -> OldestFirstCoinSelection
fn clone(&self) -> OldestFirstCoinSelection
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 OldestFirstCoinSelection
impl CoinSelectionAlgorithm for OldestFirstCoinSelection
source§fn coin_select(
&self,
required_utxos: Vec<WeightedUtxo>,
optional_utxos: Vec<WeightedUtxo>,
fee_rate: FeeRate,
target_amount: u64,
drain_script: &Script
) -> Result<CoinSelectionResult, Error>
fn coin_select( &self, required_utxos: Vec<WeightedUtxo>, optional_utxos: Vec<WeightedUtxo>, fee_rate: FeeRate, target_amount: u64, drain_script: &Script ) -> Result<CoinSelectionResult, Error>
Perform the coin selection Read more
source§impl Debug for OldestFirstCoinSelection
impl Debug for OldestFirstCoinSelection
source§impl Default for OldestFirstCoinSelection
impl Default for OldestFirstCoinSelection
source§fn default() -> OldestFirstCoinSelection
fn default() -> OldestFirstCoinSelection
Returns the “default value” for a type. Read more
impl Copy for OldestFirstCoinSelection
Auto Trait Implementations§
impl Freeze for OldestFirstCoinSelection
impl RefUnwindSafe for OldestFirstCoinSelection
impl Send for OldestFirstCoinSelection
impl Sync for OldestFirstCoinSelection
impl Unpin for OldestFirstCoinSelection
impl UnwindSafe for OldestFirstCoinSelection
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