From 8fcc5e39d773963146fa9de9e9bb51954ac8b941 Mon Sep 17 00:00:00 2001 From: yancy Date: Sat, 14 Dec 2024 17:02:07 -0600 Subject: [PATCH] wip --- src/branch_and_bound.rs | 2 +- src/coin_grinder.rs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/branch_and_bound.rs b/src/branch_and_bound.rs index 9caf52a..18b35cf 100644 --- a/src/branch_and_bound.rs +++ b/src/branch_and_bound.rs @@ -293,7 +293,7 @@ pub fn select_coins_bnb( iteration += 1; } - return index_to_utxo_list(best_selection, w_utxos); + index_to_utxo_list(best_selection, w_utxos); } fn index_to_utxo_list( diff --git a/src/coin_grinder.rs b/src/coin_grinder.rs index 19a5f0b..e66ca35 100644 --- a/src/coin_grinder.rs +++ b/src/coin_grinder.rs @@ -9,8 +9,7 @@ /// # Parameters /// /// * target: Target spend `Amount` -/// * change_target: A bound on the `Amount` to increase target by with which to create a change -/// output. +/// * change_target: A bound on the `Amount` to increase target by with which to create a change output. /// * max_selection_weight: Maximum allowable selection weight. /// * fee_rate: Needed to calculate the effective_value. /// * weighted_utxos: The candidate Weighted UTXOs from which to choose a selection from @@ -53,7 +52,6 @@ use bitcoin::amount::CheckedSum; /// - Not enough potential amount to meet the target, etc /// - Target Amount is zero (no match possible) /// - UTXO space was searched succefully however no match was found - // The sum of UTXO amounts after this UTXO index, e.g. lookahead[5] = Σ(UTXO[6+].amount) fn build_lookahead(lookahead: Vec<(Amount, &Utxo)>, available_value: Amount) -> Vec{ lookahead.iter().map(|(e, _w)| e).scan(available_value, |state, &u| {