Tolerate errors in RegisterCoinsAsync
MODIFY
WalletWasabi/WabiSabi/Client/AliceClient.cs
WalletWasabi/WabiSabi/Client/AliceClient.cs
@@ -26,7 +26,7 @@ namespace WalletWasabi.WabiSabi.Client
public uint256 AliceId { get; }
public uint256 RoundId { get; }
private ArenaClient ArenaClient { get; }
- private Coin Coin { get; }
+ public Coin Coin { get; }
private FeeRate FeeRate { get; }
private BitcoinSecret BitcoinSecret { get; }

MODIFY
WalletWasabi/WabiSabi/Client/CoinJoinClient.cs
WalletWasabi/WabiSabi/Client/CoinJoinClient.cs
@@ -101,14 +101,29 @@ namespace WalletWasabi.WabiSabi.Client
return aliceClients;
}
- private async Task RegisterCoinsAsync(IEnumerable<AliceClient> aliceClients, CancellationToken stoppingToken)
+ private async Task<IEnumerable<AliceClient>> RegisterCoinsAsync(IEnumerable<AliceClient> aliceClients, CancellationToken stoppingToken)
+ {
+ List<AliceClient> successfulAliceClients = new();
+ try
{
foreach (var aliceClient in aliceClients)
{
await aliceClient.RegisterInputAsync(stoppingToken).ConfigureAwait(false);
+ successfulAliceClients.Add(aliceClient);
+ }
+ }
+ catch (Exception) // Try to register other inputs after an error?
+ {
+ // We got a partially successful registration. Sanity check.
+ if (successfulAliceClients.Count == 0 || successfulAliceClients.Sum(a => a.Coin.Amount) < Money.Coins(0.001m)) //TODO: what is the minimum here?
+ {
+ throw;
}
}
+ return successfulAliceClients;
+ }
+
private async Task ConfirmConnectionsAsync(IEnumerable<AliceClient> aliceClients, CancellationToken stoppingToken)
{
foreach (var alice in aliceClients)

Tolerate errors in RegisterCoinsAsync