Rename Register => RegisterAndConfirm
MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/AliceTimeoutTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/AliceTimeoutTests.cs
@@ -35,7 +35,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend
var aliceClient = new AliceClient(RoundState.FromRound(round), arenaClient, coin, key.GetBitcoinSecret(round.Network));
using CancellationTokenSource cancellationTokenSource = new();
- var task = aliceClient.RegisterInputAsync(roundStateUpdater, cancellationTokenSource.Token);
+ var task = aliceClient.RegisterAndConfirmInputAsync(roundStateUpdater, cancellationTokenSource.Token);
while (round.Alices.Count == 0)
{

MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PhaseStepping/StepOutputRegistrationTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PhaseStepping/StepOutputRegistrationTests.cs
@@ -209,8 +209,8 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PhaseStepping
using RoundStateUpdater roundStateUpdater = new(TimeSpan.FromSeconds(2), new ArenaRequestHandlerAdapter(arena));
await roundStateUpdater.StartAsync(CancellationToken.None);
- var task1 = aliceClient1.RegisterInputAsync(roundStateUpdater, CancellationToken.None);
- var task2 = aliceClient2.RegisterInputAsync(roundStateUpdater, CancellationToken.None);
+ var task1 = aliceClient1.RegisterAndConfirmInputAsync(roundStateUpdater, CancellationToken.None);
+ var task2 = aliceClient2.RegisterAndConfirmInputAsync(roundStateUpdater, CancellationToken.None);
await arena.TriggerAndWaitRoundAsync(TimeSpan.FromSeconds(21));
Assert.Equal(Phase.ConnectionConfirmation, round.Phase);

MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PhaseStepping/StepTransactionSigningTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PhaseStepping/StepTransactionSigningTests.cs
@@ -246,8 +246,8 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PhaseStepping
using RoundStateUpdater roundStateUpdater = new(TimeSpan.FromSeconds(2), new ArenaRequestHandlerAdapter(arena));
await roundStateUpdater.StartAsync(CancellationToken.None);
- var task1 = aliceClient1.RegisterInputAsync(roundStateUpdater, CancellationToken.None);
- var task2 = aliceClient2.RegisterInputAsync(roundStateUpdater, CancellationToken.None);
+ var task1 = aliceClient1.RegisterAndConfirmInputAsync(roundStateUpdater, CancellationToken.None);
+ var task2 = aliceClient2.RegisterAndConfirmInputAsync(roundStateUpdater, CancellationToken.None);
await arena.TriggerAndWaitRoundAsync(TimeSpan.FromSeconds(21));
Assert.Equal(Phase.ConnectionConfirmation, round.Phase);

MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Client/BobClientTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Client/BobClientTests.cs
@@ -54,7 +54,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Client
using RoundStateUpdater roundStateUpdater = new(TimeSpan.FromSeconds(2), wabiSabiApi);
await roundStateUpdater.StartAsync(CancellationToken.None);
- var task = aliceClient.RegisterInputAsync(roundStateUpdater, CancellationToken.None);
+ var task = aliceClient.RegisterAndConfirmInputAsync(roundStateUpdater, CancellationToken.None);
do
{

MODIFY
WalletWasabi/WabiSabi/Client/AliceClient.cs
WalletWasabi/WabiSabi/Client/AliceClient.cs
@@ -40,7 +40,7 @@ namespace WalletWasabi.WabiSabi.Client
private long MaxVsizeAllocationPerAlice { get; }
private TimeSpan ConfirmationTimeout { get; }
- public async Task RegisterInputAsync(RoundStateUpdater roundStatusUpdater, CancellationToken cancellationToken)
+ public async Task RegisterAndConfirmInputAsync(RoundStateUpdater roundStatusUpdater, CancellationToken cancellationToken)
{
var response = await ArenaClient.RegisterInputAsync(RoundId, Coin.Outpoint, BitcoinSecret.PrivateKey, cancellationToken).ConfigureAwait(false);
var remoteAliceId = response.Value;

MODIFY
WalletWasabi/WabiSabi/Client/CoinJoinClient.cs
WalletWasabi/WabiSabi/Client/CoinJoinClient.cs
@@ -83,7 +83,7 @@ namespace WalletWasabi.WabiSabi.Client
var aliceClientsToRegister = coinCandidates.Select(x => (SmartCoin: x, AliceClient: CreateAliceClient(x.Coin, roundState))).ToImmutableArray();
// Register coins.
- var registeredAliceClients = await RegisterCoinsAsync(aliceClientsToRegister, cancellationToken).ConfigureAwait(false);
+ var registeredAliceClients = await RegisterAndConfirmCoinsAsync(aliceClientsToRegister, cancellationToken).ConfigureAwait(false);
if (!registeredAliceClients.Any())
{
throw new InvalidOperationException($"Round ({roundState.Id}): There is no available alices to participate with.");
@@ -146,14 +146,14 @@ namespace WalletWasabi.WabiSabi.Client
return new AliceClient(roundState, aliceArenaClient, coin, secret);
}
- private async Task<ImmutableArray<AliceClient>> RegisterCoinsAsync(
+ private async Task<ImmutableArray<AliceClient>> RegisterAndConfirmCoinsAsync(
IEnumerable<(SmartCoin SmartCoin, AliceClient AliceClient)> aliceClients, CancellationToken cancellationToken)
{
async Task<AliceClient?> RegisterInputTask(SmartCoin smartCoin, AliceClient aliceClient)
{
try
{
- await aliceClient.RegisterInputAsync(RoundStatusUpdater, cancellationToken).ConfigureAwait(false);
+ await aliceClient.RegisterAndConfirmInputAsync(RoundStatusUpdater, cancellationToken).ConfigureAwait(false);
smartCoin.CoinJoinInProgress = true;
return aliceClient;
}

Rename Register => RegisterAndConfirm