remove incorrect opt
MODIFY
WalletWasabi/Blockchain/TransactionBuilding/BnB/LessSelectionStrategy.cs
WalletWasabi/Blockchain/TransactionBuilding/BnB/LessSelectionStrategy.cs
@@ -17,12 +17,6 @@ public class LessSelectionStrategy : SelectionStrategy
return EvaluationResult.SkipBranch;
}
- if (sum + RemainingAmount < BestTargetSoFar)
- {
- // The remaining coins cannot sum up to our solution, so cut the branch.
- return EvaluationResult.SkipBranch;
- }
-
if (BestTargetSoFar < totalCost)
{
BestSelectionSoFar = selection[0..depth];

MODIFY
WalletWasabi/Blockchain/TransactionBuilding/BnB/MoreSelectionStrategy.cs
WalletWasabi/Blockchain/TransactionBuilding/BnB/MoreSelectionStrategy.cs
@@ -18,11 +18,6 @@ public class MoreSelectionStrategy : SelectionStrategy
// Our solution is already better than what we might get here.
return EvaluationResult.SkipBranch;
}
- else if (sum + RemainingAmount < Target)
- {
- // The remaining coins cannot sum up to required target, cut the branch.
- return EvaluationResult.SkipBranch;
- }
else if (sum >= Target)
{
if (BestTargetSoFar > totalCost)

MODIFY
WalletWasabi/Blockchain/TransactionBuilding/BnB/SelectionStrategy.cs
WalletWasabi/Blockchain/TransactionBuilding/BnB/SelectionStrategy.cs
@@ -14,7 +14,6 @@ public abstract class SelectionStrategy
InputCosts = inputCosts;
InputValues = inputValues;
Target = target;
- RemainingAmount = InputValues.Sum();
}
/// <summary>Costs corresponding to <see cref="InputValues"/> values.</summary>
@@ -32,9 +31,6 @@ public abstract class SelectionStrategy
/// <summary>Input cost(s) of the current selection.</summary>
protected long CurrentInputCosts { get; set; } = 0;
- /// <summary>Sum of the selectable/remaining coins.</summary>
- protected long RemainingAmount { get; set; }
-
/// <summary>Sum of the best found selection.</summary>
protected long BestTargetSoFar { get; set; }
@@ -58,7 +54,6 @@ public abstract class SelectionStrategy
if (selection[depth] == 0)
{
CurrentInputCosts += InputCosts[depth];
- RemainingAmount -= InputValues[depth];
}
selection[depth] = InputValues[depth];
@@ -69,7 +64,6 @@ public abstract class SelectionStrategy
if (selection[depth] > 0)
{
CurrentInputCosts -= InputCosts[depth];
- RemainingAmount += InputValues[depth];
}
newSum = oldSum - selection[depth];

remove incorrect opt