Skip to content

Commit

Permalink
Remove unused trait
Browse files Browse the repository at this point in the history
  • Loading branch information
yancyribbens committed Jul 5, 2024
1 parent 30886e6 commit 00e2e3b
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ use crate::single_random_draw::select_coins_srd;
use bitcoin::blockdata::transaction::TxIn;
use rand::thread_rng;

/// Trait that a UTXO struct must implement to be used as part of the coin selection
/// algorithm.
pub trait Utxo: Clone {
/// Return the value of the UTXO.
fn get_value(&self) -> u64;
}

// https://github.com/bitcoin/bitcoin/blob/f722a9bd132222d9d5cd503b5af25c905b205cdb/src/wallet/coinselection.h#L20
const CHANGE_LOWER: Amount = Amount::from_sat(50_000);

Expand Down Expand Up @@ -78,7 +71,7 @@ impl WeightedUtxo {
/// Requires compilation with the "rand" feature.
#[cfg(feature = "rand")]
#[cfg_attr(docsrs, doc(cfg(feature = "rand")))]
pub fn select_coins<T: Utxo>(
pub fn select_coins(
target: Amount,
cost_of_change: Amount,
fee_rate: FeeRate,
Expand Down

0 comments on commit 00e2e3b

Please sign in to comment.