Test InputRegistration
MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PostRequests/RegisterInputSuccessTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PostRequests/RegisterInputSuccessTests.cs
@@ -41,6 +41,30 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
await arena.StopAsync(CancellationToken.None);
}
+ [Fact]
+ public async Task SuccessFromPreviusCoinJoinAsync()
+ {
+ WabiSabiConfig cfg = new();
+ var round = WabiSabiFactory.CreateRound(cfg);
+
+ using Key key = new();
+ var coin = WabiSabiFactory.CreateCoin(key);
+ using Arena arena = await WabiSabiFactory.CreateAndStartArenaAsync(cfg, WabiSabiFactory.CreatePreconfiguredRpcClient(coin), round);
+ arena.InMemoryCoinJoinIdStore.Add(coin.Outpoint.Hash);
+
+ var minAliceDeadline = DateTimeOffset.UtcNow + cfg.ConnectionConfirmationTimeout * 0.9;
+ var arenaClient = WabiSabiFactory.CreateArenaClient(arena);
+ var ownershipProof = WabiSabiFactory.CreateOwnershipProof(key, round.Id);
+
+ var resp = await arenaClient.RegisterInputAsync(round.Id, coin.Outpoint, ownershipProof, CancellationToken.None);
+ AssertSingleAliceSuccessfullyRegistered(round, minAliceDeadline, resp);
+
+ var myAlice = Assert.Single(round.Alices);
+ Assert.True(myAlice.IsComingFromCoinJoin);
+
+ await arena.StopAsync(CancellationToken.None);
+ }
+
[Fact]
public async Task SuccessWithAliceUpdateIntraRoundAsync()
{

MODIFY
WalletWasabi/WabiSabi/Backend/Rounds/Arena.cs
WalletWasabi/WabiSabi/Backend/Rounds/Arena.cs
@@ -43,7 +43,7 @@ namespace WalletWasabi.WabiSabi.Backend.Rounds
private Prison Prison { get; }
private SecureRandom Random { get; }
private CoinJoinTransactionArchiver? TransactionArchiver { get; }
- private InMemoryCoinJoinIdStore InMemoryCoinJoinIdStore { get; }
+ public InMemoryCoinJoinIdStore InMemoryCoinJoinIdStore { get; }
protected override async Task ActionAsync(CancellationToken cancel)
{

Test InputRegistration