Disallow unconfirmed outputs registration
MODIFY
WalletWasabi.Backend/Controllers/ChaumianCoinJoinController.cs
WalletWasabi.Backend/Controllers/ChaumianCoinJoinController.cs
@@ -217,12 +217,7 @@ namespace WalletWasabi.Backend.Controllers
// Check if unconfirmed.
if (getTxOutResponse.Confirmations <= 0)
{
- // If it spends a CJ then it may be acceptable to register.
- if (!await Coordinator.ContainsUnconfirmedCoinJoinAsync(inputProof.Input.Hash))
- {
- return BadRequest("Provided input is neither confirmed, nor is from an unconfirmed coinjoin.");
- }
- allInputsConfirmed = false;
+ return BadRequest("Provided input is unconfirmed.");
}
// Check if immature.

MODIFY
WalletWasabi.Tests/RegressionTests/CoinJoinTests.cs
WalletWasabi.Tests/RegressionTests/CoinJoinTests.cs
@@ -183,7 +183,7 @@ namespace WalletWasabi.Tests.RegressionTests
inputsRequest.Inputs = new List<InputProofModel> { new InputProofModel { Input = coin.Outpoint, Proof = dummySignature } };
httpRequestException = await Assert.ThrowsAsync<HttpRequestException>(async () => await CreateNewAliceClientAsync(roundId, registeredAddresses, signerPubKeys, requesters, inputsRequest));
- Assert.Equal($"{HttpStatusCode.BadRequest.ToReasonString()}\nProvided input is neither confirmed, nor is from an unconfirmed coinjoin.", httpRequestException.Message);
+ Assert.Equal($"{HttpStatusCode.BadRequest.ToReasonString()}\nProvided input is unconfirmed.", httpRequestException.Message);
var blocks = await rpc.GenerateAsync(1);
httpRequestException = await Assert.ThrowsAsync<HttpRequestException>(async () => await CreateNewAliceClientAsync(roundId, registeredAddresses, signerPubKeys, requesters, inputsRequest));

Disallow unconfirmed outputs registration