Skip to content

Commit 365aca4

Browse files
committed
refactor: Simplify feerate comparison statement
1 parent ba2edca commit 365aca4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wallet/coinselection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ std::optional<SelectionResult> SelectCoinsBnB(std::vector<OutputGroup>& utxo_poo
9393
bool backtrack = false;
9494
if (curr_value + curr_available_value < selection_target || // Cannot possibly reach target with the amount remaining in the curr_available_value.
9595
curr_value > selection_target + cost_of_change || // Selected value is out of range, go back and try other branch
96-
(curr_waste > best_waste && (utxo_pool.at(0).fee - utxo_pool.at(0).long_term_fee) > 0)) { // Don't select things which we know will be more wasteful if the waste is increasing
96+
(curr_waste > best_waste && (utxo_pool.at(0).fee > utxo_pool.at(0).long_term_fee))) { // Don't select things which we know will be more wasteful if the waste is increasing
9797
backtrack = true;
9898
} else if (curr_value >= selection_target) { // Selected value is within range
9999
curr_waste += (curr_value - selection_target); // This is the excess value which is added to the waste for the below comparison

0 commit comments

Comments
 (0)