Struct bdk::wallet::coin_selection::OldestFirstCoinSelection
source · [−]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
sourceimpl Clone for OldestFirstCoinSelection
impl Clone for OldestFirstCoinSelection
sourcefn clone(&self) -> OldestFirstCoinSelection
fn clone(&self) -> OldestFirstCoinSelection
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<D: Database> CoinSelectionAlgorithm<D> for OldestFirstCoinSelection
impl<D: Database> CoinSelectionAlgorithm<D> for OldestFirstCoinSelection
sourcefn coin_select(
&self,
database: &D,
required_utxos: Vec<WeightedUtxo>,
optional_utxos: Vec<WeightedUtxo>,
fee_rate: FeeRate,
target_amount: u64,
drain_script: &Script
) -> Result<CoinSelectionResult, Error>
fn coin_select(
&self,
database: &D,
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
sourceimpl Debug for OldestFirstCoinSelection
impl Debug for OldestFirstCoinSelection
sourceimpl Default for OldestFirstCoinSelection
impl Default for OldestFirstCoinSelection
sourcefn default() -> OldestFirstCoinSelection
fn default() -> OldestFirstCoinSelection
Returns the “default value” for a type. Read more
impl Copy for OldestFirstCoinSelection
Auto Trait Implementations
impl RefUnwindSafe for OldestFirstCoinSelection
impl Send for OldestFirstCoinSelection
impl Sync for OldestFirstCoinSelection
impl Unpin for OldestFirstCoinSelection
impl UnwindSafe for OldestFirstCoinSelection
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more