Remove `ConnectionConfirmation` interval
MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Client/AliceClientTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Client/AliceClientTests.cs
@@ -56,7 +56,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Client
var aliceClient = new AliceClient(round.Id, arenaClient, coin1.Coin, round.FeeRate, bitcoinSecret);
await aliceClient.RegisterInputAsync(CancellationToken.None);
- Task confirmationTask = aliceClient.ConfirmConnectionAsync(TimeSpan.FromSeconds(3), CancellationToken.None);
+ Task confirmationTask = aliceClient.ConfirmConnectionAsync(CancellationToken.None);
await arena.TriggerAndWaitRoundAsync(TimeSpan.FromMinutes(1));
await confirmationTask;

MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Client/BobClientTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Client/BobClientTests.cs
@@ -57,7 +57,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Client
var aliceClient = new AliceClient(round.Id, aliceArenaClient, coin1.Coin, round.FeeRate, bitcoinSecret);
await aliceClient.RegisterInputAsync(CancellationToken.None);
- Task confirmationTask = aliceClient.ConfirmConnectionAsync(TimeSpan.FromSeconds(3), CancellationToken.None);
+ Task confirmationTask = aliceClient.ConfirmConnectionAsync(CancellationToken.None);
await arena.TriggerAndWaitRoundAsync(TimeSpan.FromMinutes(1));
await confirmationTask;

MODIFY
WalletWasabi/WabiSabi/Client/AliceClient.cs
WalletWasabi/WabiSabi/Client/AliceClient.cs
@@ -46,15 +46,15 @@ namespace WalletWasabi.WabiSabi.Client
Logger.LogInfo($"Round ({RoundId}), Alice ({AliceId}): Registered an input.");
}
- public async Task ConfirmConnectionAsync(TimeSpan confirmInterval, CancellationToken cancellationToken)
+ public async Task ConfirmConnectionAsync(CancellationToken cancellationToken)
{
- while (!await ConfirmConnectionAsync(cancellationToken).ConfigureAwait(false))
+ while (!await TryConfirmConnectionAsync(cancellationToken).ConfigureAwait(false))
{
- await Task.Delay(confirmInterval, cancellationToken).ConfigureAwait(false);
+ await Task.Delay(1_000, cancellationToken).ConfigureAwait(false);
}
}
- private async Task<bool> ConfirmConnectionAsync(CancellationToken cancellationToken)
+ private async Task<bool> TryConfirmConnectionAsync(CancellationToken cancellationToken)
{
var inputVsize = Constants.P2wpkhInputVirtualSize;
var inputRemainingVsizes = new[] { ProtocolConstants.MaxVsizePerAlice - inputVsize };

MODIFY
WalletWasabi/WabiSabi/Client/CoinJoinClient.cs
WalletWasabi/WabiSabi/Client/CoinJoinClient.cs
@@ -153,7 +153,7 @@ namespace WalletWasabi.WabiSabi.Client
private async Task<List<AliceClient>> ConfirmConnectionsAsync(IEnumerable<AliceClient> aliceClients, CancellationToken cancellationToken)
{
- var confirmationRequests = aliceClients.Select(alice => WrapCall(alice, alice.ConfirmConnectionAsync(TimeSpan.FromMilliseconds(Random.Next(100, 1_000)), cancellationToken))).ToArray();
+ var confirmationRequests = aliceClients.Select(alice => WrapCall(alice, alice.ConfirmConnectionAsync(cancellationToken))).ToArray();
var completedRequests = await Task.WhenAll(confirmationRequests).ConfigureAwait(false);
foreach (var request in completedRequests.Where(x => !x.Success))

Remove `ConnectionConfirmation` interval