You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (curr_value + curr_available_value < selection_target || // Cannot possibly reach target with the amount remaining in the curr_available_value.
94
-
curr_value > selection_target + cost_of_change || // Selected value is out of range, go back and try other branch
94
+
if (curr_value + curr_available_value < selection_target || // Cannot possibly reach target with the amount remaining in the curr_available_value.
95
+
curr_value > selection_target + cost_of_change || // Selected value is out of range, go back and try other branch
95
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
97
backtrack = true;
97
98
} elseif (curr_value >= selection_target) { // Selected value is within range
// Avoid searching a branch if the previous UTXO has the same value and same waste and was excluded. Since the ratio of fee to
138
-
// long term fee is the same, we only need to check if one of those values match in order to know that the waste is the same.
139
137
if (curr_selection.empty() ||
140
138
// The previous index is included and therefore not relevant for exclusion shortcut
141
139
(utxo_pool_index - 1) == curr_selection.back() ||
140
+
// Avoid searching a branch if the previous UTXO has the same value and same waste and was excluded.
141
+
// Since the ratio of fee to long term fee is the same, we only need to check if one of those values match in order to know that the waste is the same.
0 commit comments