Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
yancyribbens committed Dec 14, 2024
1 parent 7b24ab6 commit 8fcc5e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/branch_and_bound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ pub fn select_coins_bnb<Utxo: WeightedUtxo>(
iteration += 1;
}

return index_to_utxo_list(best_selection, w_utxos);
index_to_utxo_list(best_selection, w_utxos);
}

fn index_to_utxo_list<Utxo: WeightedUtxo>(
Expand Down
4 changes: 1 addition & 3 deletions src/coin_grinder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<Utxo: WeightedUtxo>(lookahead: Vec<(Amount, &Utxo)>, available_value: Amount) -> Vec<Amount>{
lookahead.iter().map(|(e, _w)| e).scan(available_value, |state, &u| {
Expand Down

0 comments on commit 8fcc5e3

Please sign in to comment.