Sequencial confirmation
MODIFY
WalletWasabi/WabiSabi/Client/CoinJoinClient.cs
WalletWasabi/WabiSabi/Client/CoinJoinClient.cs
@@ -99,21 +99,11 @@ namespace WalletWasabi.WabiSabi.Client
return aliceClients.ToArray();
}
- private async Task ConfirmConnectionsAsync(AliceClient[] aliceClients, CancellationToken stoppingToken)
+ private async Task ConfirmConnectionsAsync(IEnumerable<AliceClient> aliceClients, CancellationToken stoppingToken)
{
- Task[] confirmTasks = aliceClients.Select(aliceClient => aliceClient.ConfirmConnectionAsync(TimeSpan.FromSeconds(5), stoppingToken)).ToArray();
-
- try
- {
- await Task.WhenAll(confirmTasks).ConfigureAwait(false);
- }
- catch (Exception)
- {
- IEnumerable<AggregateException> exceptions = confirmTasks.Where(t => t.IsFaulted && t.Exception is { }).Select(t => t.Exception!);
- if (exceptions.Any())
+ foreach (var alice in aliceClients)
{
- throw new AggregateException(exceptions);
- }
+ await alice.ConfirmConnectionAsync(TimeSpan.FromMilliseconds(Random.Next(1000, 5000)), stoppingToken).ConfigureAwait(false);
}
}

Sequencial confirmation