change check order
MODIFY
WalletWasabi/Blockchain/TransactionBuilding/BnB/CheapestSelectionStrategy.cs
WalletWasabi/Blockchain/TransactionBuilding/BnB/CheapestSelectionStrategy.cs
@@ -130,12 +130,6 @@ public class CheapestSelectionStrategy
return EvaluationResult.SkipBranch;
}
- if (depth == selection.Length)
- {
- // Leaf reached, no match
- return EvaluationResult.SkipBranch;
- }
-
if (sum + _remainingAmount < _bestTargetSoFar)
{
// The remaining coins cannot sum up to our solution, so cut the branch.
@@ -148,6 +142,12 @@ public class CheapestSelectionStrategy
_bestTargetSoFar = totalCost;
}
+ if (depth == selection.Length)
+ {
+ // Leaf reached, no match
+ return EvaluationResult.SkipBranch;
+ }
+
return EvaluationResult.Continue;
}
else

change check order