Handle only one coin
MODIFY
WalletWasabi/WabiSabi/Client/CoinJoinClient.cs
WalletWasabi/WabiSabi/Client/CoinJoinClient.cs
@@ -464,15 +464,17 @@ public class CoinJoinClient
// Select a group of coins those are close to each other by Anonimity Score.
Dictionary<int, IEnumerable<SmartCoin>> groups = new();
- // We can potentially add a lot more groups to improve results.
- var sw1 = Stopwatch.StartNew();
- foreach (var coin in largestAmounts)
+ if (largestAmounts.Length == 1 || inputCount == 1)
{
- if (inputCount == 1)
+ foreach (var coin in largestAmounts)
{
TryAddGroup(parameters, groups, new[] { coin });
}
- else
+ }
+
+ // Create a bunch of combinations.
+ var sw1 = Stopwatch.StartNew();
+ foreach (var coin in largestAmounts)
{
var sw2 = Stopwatch.StartNew();
foreach (var group in filteredCoins
@@ -495,7 +497,6 @@ public class CoinJoinClient
break;
}
}
- }
if (!groups.Any())
{

Handle only one coin