Move CconnectionConfirmationTimeOut to RoundState
MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Models/MultipartyTransactionTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Models/MultipartyTransactionTests.cs
@@ -13,7 +13,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Models
public class MultipartyTransactionTests
{
private static MoneyRange DefaultAllowedAmounts = new(Money.Zero, Money.Coins(1));
- private static MultipartyTransactionParameters DefaultParameters = new(FeeRate.Zero, DefaultAllowedAmounts, DefaultAllowedAmounts, Network.Main, TimeSpan.FromSeconds(10));
+ private static MultipartyTransactionParameters DefaultParameters = new(FeeRate.Zero, DefaultAllowedAmounts, DefaultAllowedAmounts, Network.Main);
private static void ThrowsProtocolException(WabiSabiProtocolErrorCode expectedError, Action action) =>
Assert.Equal(expectedError, Assert.Throws<WabiSabiProtocolException>(action).ErrorCode);

MODIFY
WalletWasabi/WabiSabi/Backend/Rounds/Round.cs
WalletWasabi/WabiSabi/Backend/Rounds/Round.cs
@@ -24,7 +24,7 @@ namespace WalletWasabi.WabiSabi.Backend.Rounds
VsizeCredentialIssuerParameters = VsizeCredentialIssuer.CredentialIssuerSecretKey.ComputeCredentialIssuerParameters();
var allowedAmounts = new MoneyRange(roundParameters.MinRegistrableAmount, RoundParameters.MaxRegistrableAmount);
- var txParams = new MultipartyTransactionParameters(roundParameters.FeeRate, allowedAmounts, allowedAmounts, roundParameters.Network, roundParameters.ConnectionConfirmationTimeout);
+ var txParams = new MultipartyTransactionParameters(roundParameters.FeeRate, allowedAmounts, allowedAmounts, roundParameters.Network);
CoinjoinState = new ConstructionState(txParams);
Id = CalculateHash();

MODIFY
WalletWasabi/WabiSabi/Client/CoinJoinClient.cs
WalletWasabi/WabiSabi/Client/CoinJoinClient.cs
@@ -69,7 +69,7 @@ namespace WalletWasabi.WabiSabi.Client
aliceClients = await RegisterCoinsAsync(aliceClients, cancellationToken).ConfigureAwait(false);
// Confirm coins.
- aliceClients = await ConfirmConnectionsAsync(aliceClients, constructionState.ConnectionConfirmationTimeout, cancellationToken).ConfigureAwait(false);
+ aliceClients = await ConfirmConnectionsAsync(aliceClients, roundState.ConnectionConfirmationTimeout, cancellationToken).ConfigureAwait(false);
// Output registration.
roundState = await RoundStatusUpdater.CreateRoundAwaiter(roundState.Id, rs => rs.Phase == Phase.OutputRegistration, cancellationToken).ConfigureAwait(false);

MODIFY
WalletWasabi/WabiSabi/Models/MultipartyTransaction/ConstructionState.cs
WalletWasabi/WabiSabi/Models/MultipartyTransaction/ConstructionState.cs
@@ -13,8 +13,6 @@ namespace WalletWasabi.WabiSabi.Models.MultipartyTransaction
{
}
- public TimeSpan ConnectionConfirmationTimeout => Parameters.ConnectionConfirmationTimeout;
-
// TODO ownership proofs and spend status also in scope
public ConstructionState AddInput(Coin coin)
{

MODIFY
WalletWasabi/WabiSabi/Models/MultipartyTransaction/MultipartyTransactionParameters.cs
WalletWasabi/WabiSabi/Models/MultipartyTransaction/MultipartyTransactionParameters.cs
@@ -18,14 +18,12 @@ namespace WalletWasabi.WabiSabi.Models.MultipartyTransaction
FeeRate feeRate,
MoneyRange allowedInputAmounts,
MoneyRange allowedOutputAmounts,
- Network network,
- TimeSpan connectionConfirmationTimeout)
+ Network network)
{
FeeRate = feeRate;
AllowedInputAmounts = allowedInputAmounts;
AllowedOutputAmounts = allowedOutputAmounts;
Network = network;
- ConnectionConfirmationTimeout = connectionConfirmationTimeout;
}
// These parameters need to be committed to the transcript, but we want
@@ -41,7 +39,6 @@ namespace WalletWasabi.WabiSabi.Models.MultipartyTransaction
public MoneyRange AllowedInputAmounts { get; init; }
public MoneyRange AllowedOutputAmounts { get; init; }
public Network Network { get; }
- public TimeSpan ConnectionConfirmationTimeout { get; }
// implied:
// segwit transaction

MODIFY
WalletWasabi/WabiSabi/Models/RoundState.cs
WalletWasabi/WabiSabi/Models/RoundState.cs
@@ -12,10 +12,11 @@ namespace WalletWasabi.WabiSabi.Models
CredentialIssuerParameters VsizeCredentialIssuerParameters,
FeeRate FeeRate,
Phase Phase,
+ TimeSpan ConnectionConfirmationTimeout,
MultipartyTransactionState CoinjoinState)
{
public static RoundState FromRound(Round round) =>
- new RoundState(round.Id, round.AmountCredentialIssuerParameters, round.VsizeCredentialIssuerParameters, round.FeeRate, round.Phase, round.CoinjoinState);
+ new RoundState(round.Id, round.AmountCredentialIssuerParameters, round.VsizeCredentialIssuerParameters, round.FeeRate, round.Phase, round.ConnectionConfirmationTimeout, round.CoinjoinState);
public TState Assert<TState>() where TState : MultipartyTransactionState =>
CoinjoinState switch

Move CconnectionConfirmationTimeOut to RoundState