Fix ArenaRequestHandler instantations.
MODIFY
WalletWasabi.Backend/Controllers/WabiSabiController.cs
WalletWasabi.Backend/Controllers/WabiSabiController.cs
-using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;

MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/AliceTimeoutTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/AliceTimeoutTests.cs
@@ -3,11 +3,8 @@ using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
-using WalletWasabi.Blockchain.Analysis.Clustering;
-using WalletWasabi.Blockchain.Keys;
using WalletWasabi.Tests.Helpers;
using WalletWasabi.WabiSabi.Backend;
-using WalletWasabi.WabiSabi.Backend.Banning;
using WalletWasabi.WabiSabi.Backend.PostRequests;
using WalletWasabi.WabiSabi.Backend.Rounds;
using WalletWasabi.WabiSabi.Client;
@@ -73,7 +70,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend
using Arena arena = await WabiSabiFactory.CreateAndStartArenaAsync(cfg, round);
var req = WabiSabiFactory.CreateConnectionConfirmationRequest(round);
- await using ArenaRequestHandler handler = new(cfg, new Prison(), arena);
+ await using ArenaRequestHandler handler = new(arena);
Assert.Single(round.Alices);
DateTimeOffset preDeadline = DateTimeOffset.UtcNow - TimeSpan.FromMilliseconds(1);
@@ -97,7 +94,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend
using Arena arena = await WabiSabiFactory.CreateAndStartArenaAsync(cfg, round);
var req = WabiSabiFactory.CreateConnectionConfirmationRequest(round);
- await using ArenaRequestHandler handler = new(cfg, new Prison(), arena);
+ await using ArenaRequestHandler handler = new(arena);
Assert.Single(round.Alices);
DateTimeOffset preDeadline = DateTimeOffset.UtcNow - TimeSpan.FromMilliseconds(1);
@@ -123,7 +120,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend
using Arena arena = await WabiSabiFactory.CreateAndStartArenaAsync(cfg, round);
var req = WabiSabiFactory.CreateConnectionConfirmationRequest(round);
- await using ArenaRequestHandler handler = new(cfg, new Prison(), arena);
+ await using ArenaRequestHandler handler = new(arena);
Assert.Equal(3, round.Alices.Count);
DateTimeOffset preDeadline = DateTimeOffset.UtcNow - TimeSpan.FromMilliseconds(1);
@@ -146,7 +143,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend
using Arena arena = await WabiSabiFactory.CreateAndStartArenaAsync(cfg, round);
var req = WabiSabiFactory.CreateConnectionConfirmationRequest(round);
- await using ArenaRequestHandler handler = new(cfg, new Prison(), arena);
+ await using ArenaRequestHandler handler = new(arena);
Assert.Single(round.Alices);
DateTimeOffset preDeadline = DateTimeOffset.UtcNow - TimeSpan.FromMilliseconds(1);

MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PostRequests/ConfirmConnectionTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PostRequests/ConfirmConnectionTests.cs
@@ -5,7 +5,6 @@ using System.Threading;
using System.Threading.Tasks;
using WalletWasabi.Tests.Helpers;
using WalletWasabi.WabiSabi.Backend;
-using WalletWasabi.WabiSabi.Backend.Banning;
using WalletWasabi.WabiSabi.Backend.Models;
using WalletWasabi.WabiSabi.Backend.PostRequests;
using WalletWasabi.WabiSabi.Backend.Rounds;
@@ -30,7 +29,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
var req = WabiSabiFactory.CreateConnectionConfirmationRequest(round);
var minAliceDeadline = DateTimeOffset.UtcNow + cfg.ConnectionConfirmationTimeout * 0.9;
- await using ArenaRequestHandler handler = new(cfg, new Prison(), arena);
+ await using ArenaRequestHandler handler = new(arena);
var resp = await handler.ConfirmConnectionAsync(req, CancellationToken.None);
Assert.NotNull(resp);
Assert.NotNull(resp.ZeroAmountCredentials);
@@ -57,7 +56,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
using Arena arena = await WabiSabiFactory.CreateAndStartArenaAsync(cfg, round);
var req = WabiSabiFactory.CreateConnectionConfirmationRequest(round);
- await using ArenaRequestHandler handler = new(cfg, new Prison(), arena);
+ await using ArenaRequestHandler handler = new(arena);
var resp = await handler.ConfirmConnectionAsync(req, CancellationToken.None);
Assert.NotNull(resp);
Assert.NotNull(resp.ZeroAmountCredentials);
@@ -76,7 +75,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
var cfg = new WabiSabiConfig();
var nonExistingRound = WabiSabiFactory.CreateRound(cfg);
using Arena arena = await WabiSabiFactory.CreateAndStartArenaAsync();
- await using ArenaRequestHandler handler = new(cfg, new Prison(), arena);
+ await using ArenaRequestHandler handler = new(arena);
var req = WabiSabiFactory.CreateConnectionConfirmationRequest(nonExistingRound);
var ex = await Assert.ThrowsAsync<WabiSabiProtocolException>(
@@ -98,7 +97,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
await arena.TriggerAndWaitRoundAsync(TimeSpan.FromSeconds(21)).ConfigureAwait(false);
var req = WabiSabiFactory.CreateConnectionConfirmationRequest(round);
- await using ArenaRequestHandler handler = new(cfg, new Prison(), arena);
+ await using ArenaRequestHandler handler = new(arena);
foreach (Phase phase in Enum.GetValues(typeof(Phase)))
{
if (phase != Phase.InputRegistration && phase != Phase.ConnectionConfirmation)
@@ -124,7 +123,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
using Arena arena = await WabiSabiFactory.CreateAndStartArenaAsync(cfg, round);
var req = WabiSabiFactory.CreateConnectionConfirmationRequest(round);
- await using ArenaRequestHandler handler = new(cfg, new Prison(), arena);
+ await using ArenaRequestHandler handler = new(arena);
var ex = await Assert.ThrowsAsync<WabiSabiProtocolException>(async () => await handler.ConfirmConnectionAsync(req, CancellationToken.None));
Assert.Equal(WabiSabiProtocolErrorCode.AliceNotFound, ex.ErrorCode);
@@ -145,7 +144,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
var incorrectVsizeCredentials = WabiSabiFactory.CreateRealCredentialRequests(round, null, 234).vsizeRequest;
var req = WabiSabiFactory.CreateConnectionConfirmationRequest(round) with { RealVsizeCredentialRequests = incorrectVsizeCredentials };
- await using ArenaRequestHandler handler = new(cfg, new Prison(), arena);
+ await using ArenaRequestHandler handler = new(arena);
var ex = await Assert.ThrowsAsync<WabiSabiProtocolException>(async () => await handler.ConfirmConnectionAsync(req, CancellationToken.None));
Assert.Equal(WabiSabiProtocolErrorCode.IncorrectRequestedVsizeCredentials, ex.ErrorCode);
Assert.False(alice.ConfirmedConnection);
@@ -166,7 +165,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
var incorrectAmountCredentials = WabiSabiFactory.CreateRealCredentialRequests(round, Money.Coins(3), null).amountRequest;
var req = WabiSabiFactory.CreateConnectionConfirmationRequest(round) with { RealAmountCredentialRequests = incorrectAmountCredentials };
- await using ArenaRequestHandler handler = new(cfg, new Prison(), arena);
+ await using ArenaRequestHandler handler = new(arena);
var ex = await Assert.ThrowsAsync<WabiSabiProtocolException>(async () => await handler.ConfirmConnectionAsync(req, CancellationToken.None));
Assert.Equal(WabiSabiProtocolErrorCode.IncorrectRequestedAmountCredentials, ex.ErrorCode);
Assert.False(alice.ConfirmedConnection);
@@ -208,7 +207,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
// invalidate serial numbers
issuer.HandleRequest(credentialsRequest);
- await using ArenaRequestHandler handler = new(cfg, new Prison(), arena);
+ await using ArenaRequestHandler handler = new(arena);
var ex = await Assert.ThrowsAsync<WabiSabiCryptoException>(async () => await handler.ConfirmConnectionAsync(req, CancellationToken.None));
Assert.Equal(WabiSabiCryptoErrorCode.SerialNumberAlreadyUsed, ex.ErrorCode);
Assert.False(alice.ConfirmedConnection);

MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PostRequests/RegisterInputFailureTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PostRequests/RegisterInputFailureTests.cs
@@ -48,7 +48,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
var round = arena.Rounds.First();
using Key key = new();
var req = WabiSabiFactory.CreateInputRegistrationRequest(round, key: key);
- await using ArenaRequestHandler handler = new(cfg, new(), arena);
+ await using ArenaRequestHandler handler = new(arena);
foreach (Phase phase in Enum.GetValues(typeof(Phase)))
{

MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PostRequests/RegisterInputToBlameRoundTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PostRequests/RegisterInputToBlameRoundTests.cs
@@ -25,7 +25,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
using Key key = new();
var mockRpc = WabiSabiFactory.CreatePreconfiguredRpcClient();
- await using ArenaRequestHandler handler = new(cfg, new(), arena);
+ await using ArenaRequestHandler handler = new(arena);
var req = WabiSabiFactory.CreateInputRegistrationRequest(round: blameRound);
var ex = await Assert.ThrowsAsync<WabiSabiProtocolException>(async () => await handler.RegisterInputAsync(req, CancellationToken.None));
Assert.Equal(WabiSabiProtocolErrorCode.InputNotWhitelisted, ex.ErrorCode);
@@ -43,7 +43,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
Round blameRound = WabiSabiFactory.CreateBlameRound(round, cfg);
using Arena arena = await WabiSabiFactory.CreateAndStartArenaAsync(cfg, round, blameRound);
- await using ArenaRequestHandler handler = new(cfg, new(), arena);
+ await using ArenaRequestHandler handler = new(arena);
var req = WabiSabiFactory.CreateInputRegistrationRequest(prevout: alice.Coin.Outpoint, round: blameRound);
var ex = await Assert.ThrowsAnyAsync<Exception>(async () => await handler.RegisterInputAsync(req, CancellationToken.None));
@@ -73,7 +73,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
using Arena arena = await ArenaBuilder.From(cfg, mockRpc, prison).CreateAndStartAsync(round, blameRound);
prison.Punish(bannedCoin, Punishment.Banned, uint256.Zero);
- await using ArenaRequestHandler handler = new(cfg, prison, arena);
+ await using ArenaRequestHandler handler = new(arena);
var req = WabiSabiFactory.CreateInputRegistrationRequest(key: key, round: blameRound, prevout: bannedCoin);
var ex = await Assert.ThrowsAsync<WabiSabiProtocolException>(async () => await handler.RegisterInputAsync(req, CancellationToken.None));

MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PostRequests/RegisterOutputTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PostRequests/RegisterOutputTests.cs
@@ -5,7 +5,6 @@ using System.Threading;
using System.Threading.Tasks;
using WalletWasabi.Tests.Helpers;
using WalletWasabi.WabiSabi.Backend;
-using WalletWasabi.WabiSabi.Backend.Banning;
using WalletWasabi.WabiSabi.Backend.Models;
using WalletWasabi.WabiSabi.Backend.PostRequests;
using WalletWasabi.WabiSabi.Backend.Rounds;
@@ -24,7 +23,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
round.SetPhase(Phase.OutputRegistration);
round.Alices.Add(WabiSabiFactory.CreateAlice(round));
using Arena arena = await WabiSabiFactory.CreateAndStartArenaAsync(cfg, round);
- await using ArenaRequestHandler handler = new(cfg, new Prison(), arena);
+ await using ArenaRequestHandler handler = new(arena);
var req = WabiSabiFactory.CreateOutputRegistrationRequest(round);
await handler.RegisterOutputAsync(req, CancellationToken.None);
@@ -39,7 +38,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
var cfg = new WabiSabiConfig();
var nonExistingRound = WabiSabiFactory.CreateRound(cfg);
using Arena arena = await WabiSabiFactory.CreateAndStartArenaAsync();
- await using ArenaRequestHandler handler = new(cfg, new Prison(), arena);
+ await using ArenaRequestHandler handler = new(arena);
var req = WabiSabiFactory.CreateOutputRegistrationRequest(nonExistingRound);
var ex = await Assert.ThrowsAsync<WabiSabiProtocolException>(async () => await handler.RegisterOutputAsync(req, CancellationToken.None));
Assert.Equal(WabiSabiProtocolErrorCode.RoundNotFound, ex.ErrorCode);
@@ -61,7 +60,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
round.Alices.Add(WabiSabiFactory.CreateAlice(Money.Coins(1), round));
var req = WabiSabiFactory.CreateOutputRegistrationRequest(round, key.PubKey.GetAddress(ScriptPubKeyType.Legacy, Network.Main).ScriptPubKey);
- await using ArenaRequestHandler handler = new(cfg, new Prison(), arena);
+ await using ArenaRequestHandler handler = new(arena);
var ex = await Assert.ThrowsAsync<WabiSabiProtocolException>(async () => await handler.RegisterOutputAsync(req, CancellationToken.None));
Assert.Equal(WabiSabiProtocolErrorCode.ScriptNotAllowed, ex.ErrorCode);
@@ -81,7 +80,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
var sha256Bounty = Script.FromHex("aa20000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f87");
var req = WabiSabiFactory.CreateOutputRegistrationRequest(round, sha256Bounty);
- await using ArenaRequestHandler handler = new(cfg, new Prison(), arena);
+ await using ArenaRequestHandler handler = new(arena);
var ex = await Assert.ThrowsAsync<WabiSabiProtocolException>(async () => await handler.RegisterOutputAsync(req, CancellationToken.None));
// The following assertion requires standardness to be checked before allowed script types
@@ -98,7 +97,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
round.SetPhase(Phase.OutputRegistration);
round.Alices.Add(WabiSabiFactory.CreateAlice(Money.Coins(1), round));
using Arena arena = await WabiSabiFactory.CreateAndStartArenaAsync(cfg, round);
- await using ArenaRequestHandler handler = new(cfg, new Prison(), arena);
+ await using ArenaRequestHandler handler = new(arena);
var req = WabiSabiFactory.CreateOutputRegistrationRequest(round);
@@ -116,7 +115,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
round.SetPhase(Phase.OutputRegistration);
round.Alices.Add(WabiSabiFactory.CreateAlice(Money.Coins(2), round));
using Arena arena = await WabiSabiFactory.CreateAndStartArenaAsync(cfg, round);
- await using ArenaRequestHandler handler = new(cfg, new Prison(), arena);
+ await using ArenaRequestHandler handler = new(arena);
var req = WabiSabiFactory.CreateOutputRegistrationRequest(round);
@@ -134,7 +133,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
round.SetPhase(Phase.OutputRegistration);
round.Alices.Add(WabiSabiFactory.CreateAlice(round));
using Arena arena = await WabiSabiFactory.CreateAndStartArenaAsync(cfg, round);
- await using ArenaRequestHandler handler = new(cfg, new Prison(), arena);
+ await using ArenaRequestHandler handler = new(arena);
var req = WabiSabiFactory.CreateOutputRegistrationRequest(round, vsize: 30);
@@ -149,7 +148,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
{
WabiSabiConfig cfg = new();
using Arena arena = await WabiSabiFactory.CreateAndStartArenaAsync(cfg);
- await using ArenaRequestHandler handler = new(cfg, new Prison(), arena);
+ await using ArenaRequestHandler handler = new(arena);
await arena.TriggerAndWaitRoundAsync(TimeSpan.FromSeconds(21));
var round = arena.Rounds.First();
round.MaxVsizeAllocationPerAlice = 11 + 31 + MultipartyTransactionParameters.SharedOverhead;

MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PostRequests/RemoveInputTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PostRequests/RemoveInputTests.cs
using System;
-using System.Collections.Generic;
using System.Linq;
-using System.Text;
using System.Threading;
using System.Threading.Tasks;
using NBitcoin;
using WalletWasabi.Tests.Helpers;
using WalletWasabi.WabiSabi.Backend;
-using WalletWasabi.WabiSabi.Backend.Banning;
using WalletWasabi.WabiSabi.Backend.Models;
using WalletWasabi.WabiSabi.Backend.PostRequests;
using WalletWasabi.WabiSabi.Backend.Rounds;
@@ -30,7 +27,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
using Arena arena = await WabiSabiFactory.CreateAndStartArenaAsync(cfg, round);
- await using ArenaRequestHandler handler = new(cfg, new Prison(), arena);
+ await using ArenaRequestHandler handler = new(arena);
// There's no such alice yet, so success.
var req = new InputsRemovalRequest(round.Id, Guid.NewGuid());
@@ -52,7 +49,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
{
using Arena arena = await WabiSabiFactory.CreateAndStartArenaAsync();
- await using ArenaRequestHandler handler = new(new WabiSabiConfig(), new Prison(), arena);
+ await using ArenaRequestHandler handler = new(arena);
var req = new InputsRemovalRequest(uint256.Zero, Guid.NewGuid());
var ex = await Assert.ThrowsAsync<WabiSabiProtocolException>(async () => await handler.RemoveInputAsync(req, CancellationToken.None));
Assert.Equal(WabiSabiProtocolErrorCode.RoundNotFound, ex.ErrorCode);
@@ -74,7 +71,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
if (phase != Phase.InputRegistration)
{
round.SetPhase(phase);
- await using ArenaRequestHandler handler = new(cfg, new Prison(), arena);
+ await using ArenaRequestHandler handler = new(arena);
var ex = await Assert.ThrowsAsync<WabiSabiProtocolException>(async () => await handler.RemoveInputAsync(req, CancellationToken.None));
Assert.Equal(WabiSabiProtocolErrorCode.WrongPhase, ex.ErrorCode);
}

MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PostRequests/SignTransactionTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PostRequests/SignTransactionTests.cs
@@ -5,7 +5,6 @@ using System.Threading;
using System.Threading.Tasks;
using WalletWasabi.Tests.Helpers;
using WalletWasabi.WabiSabi.Backend;
-using WalletWasabi.WabiSabi.Backend.Banning;
using WalletWasabi.WabiSabi.Backend.Models;
using WalletWasabi.WabiSabi.Backend.PostRequests;
using WalletWasabi.WabiSabi.Backend.Rounds;
@@ -33,7 +32,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
aliceSignedCoinJoin.Sign(key.GetBitcoinSecret(Network.Main), alice.Coin);
var req = new TransactionSignaturesRequest(round.Id, new[] { new InputWitnessPair(0, aliceSignedCoinJoin.Inputs[0].WitScript) });
- await using ArenaRequestHandler handler = new(cfg, new Prison(), arena);
+ await using ArenaRequestHandler handler = new(arena);
await handler.SignTransactionAsync(req, CancellationToken.None);
Assert.True(round.Assert<SigningState>().IsFullySigned);
await arena.StopAsync(CancellationToken.None);
@@ -43,7 +42,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
public async Task RoundNotFoundAsync()
{
using Arena arena = await WabiSabiFactory.CreateAndStartArenaAsync();
- await using ArenaRequestHandler handler = new(new WabiSabiConfig(), new Prison(), arena);
+ await using ArenaRequestHandler handler = new(arena);
var req = new TransactionSignaturesRequest(uint256.Zero, null!);
var ex = await Assert.ThrowsAsync<WabiSabiProtocolException>(async () => await handler.SignTransactionAsync(req, CancellationToken.None));
Assert.Equal(WabiSabiProtocolErrorCode.RoundNotFound, ex.ErrorCode);
@@ -64,7 +63,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
if (phase != Phase.TransactionSigning)
{
round.SetPhase(phase);
- await using ArenaRequestHandler handler = new(cfg, new Prison(), arena);
+ await using ArenaRequestHandler handler = new(arena);
var ex = await Assert.ThrowsAsync<WabiSabiProtocolException>(async () =>
await handler.SignTransactionAsync(req, CancellationToken.None));
Assert.Equal(WabiSabiProtocolErrorCode.WrongPhase, ex.ErrorCode);

MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/RequestHandlerDisposeTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/RequestHandlerDisposeTests.cs
@@ -2,8 +2,6 @@ using System;
using System.Threading;
using System.Threading.Tasks;
using WalletWasabi.Tests.Helpers;
-using WalletWasabi.WabiSabi.Backend;
-using WalletWasabi.WabiSabi.Backend.Banning;
using WalletWasabi.WabiSabi.Backend.PostRequests;
using WalletWasabi.WabiSabi.Backend.Rounds;
using Xunit;
@@ -16,7 +14,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend
public async Task DisposeGuardAsync()
{
using Arena arena = await WabiSabiFactory.CreateAndStartArenaAsync();
- ArenaRequestHandler handler = new(new WabiSabiConfig(), new Prison(), arena);
+ ArenaRequestHandler handler = new(arena);
await handler.DisposeAsync();
await Assert.ThrowsAsync<ObjectDisposedException>(async () => await handler.RegisterInputAsync(null!, CancellationToken.None));

MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Client/ArenaClientTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Client/ArenaClientTests.cs
@@ -14,7 +14,6 @@ using WalletWasabi.Helpers;
using WalletWasabi.Tests.Helpers;
using WalletWasabi.WabiSabi;
using WalletWasabi.WabiSabi.Backend;
-using WalletWasabi.WabiSabi.Backend.Banning;
using WalletWasabi.WabiSabi.Backend.Models;
using WalletWasabi.WabiSabi.Backend.PostRequests;
using WalletWasabi.WabiSabi.Backend.Rounds;
@@ -61,7 +60,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Client
using Arena arena = await WabiSabiFactory.CreateAndStartArenaAsync(config, mockRpc, round);
await arena.TriggerAndWaitRoundAsync(TimeSpan.FromMinutes(1));
- await using var coordinator = new ArenaRequestHandler(config, new Prison(), arena);
+ await using var coordinator = new ArenaRequestHandler(arena);
var wabiSabiApi = new WabiSabiController(coordinator);
var insecureRandom = new InsecureRandom();
var roundState = RoundState.FromRound(round);
@@ -177,7 +176,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Client
using Arena arena = await ArenaBuilder.From(config).CreateAndStartAsync(round);
- await using var coordinator = new ArenaRequestHandler(config, new Prison(), arena);
+ await using var coordinator = new ArenaRequestHandler(arena);
var wabiSabiApi = new WabiSabiController(coordinator);
var apiClient = new ArenaClient(null!, null!, wabiSabiApi);
@@ -204,7 +203,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Client
using Arena arena = await WabiSabiFactory.CreateAndStartArenaAsync(config, round);
var mockRpc = new Mock<IRPCClient>();
- await using var coordinator = new ArenaRequestHandler(config, new Prison(), arena);
+ await using var coordinator = new ArenaRequestHandler(arena);
var wabiSabiApi = new WabiSabiController(coordinator);
var rnd = new InsecureRandom();

MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Client/BobClientTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Client/BobClientTests.cs
@@ -9,7 +9,6 @@ using WalletWasabi.Crypto.Randomness;
using WalletWasabi.Tests.Helpers;
using WalletWasabi.WabiSabi;
using WalletWasabi.WabiSabi.Backend;
-using WalletWasabi.WabiSabi.Backend.Banning;
using WalletWasabi.WabiSabi.Backend.PostRequests;
using WalletWasabi.WabiSabi.Backend.Rounds;
using WalletWasabi.WabiSabi.Client;
@@ -33,7 +32,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Client
using Arena arena = await WabiSabiFactory.CreateAndStartArenaAsync(config, mockRpc, round);
await arena.TriggerAndWaitRoundAsync(TimeSpan.FromMinutes(1));
- await using var coordinator = new ArenaRequestHandler(config, new Prison(), arena);
+ await using var coordinator = new ArenaRequestHandler(arena);
var insecureRandom = new InsecureRandom();
var wabiSabiApi = new WabiSabiController(coordinator);
var roundState = RoundState.FromRound(round);

MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Integration/WabiSabiHttpApiIntegrationTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Integration/WabiSabiHttpApiIntegrationTests.cs
using System;
using System.Linq;
-using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;

MODIFY
WalletWasabi/WabiSabi/WabiSabiCoordinator.cs
WalletWasabi/WabiSabi/WabiSabiCoordinator.cs
@@ -26,7 +26,7 @@ namespace WalletWasabi.WabiSabi
CoinJoinTransactionArchiver transactionArchiver = new(Path.Combine(parameters.CoordinatorDataDir, "CoinJoinTransactions"));
Arena = new(parameters.RoundProgressSteppingPeriod, rpc.Network, Config, rpc, Prison, transactionArchiver);
- Postman = new(Config, Prison, Arena);
+ Postman = new(Arena);
}
public ConfigWatcher ConfigWatcher { get; }

Fix ArenaRequestHandler instantations.