Add DosSeverity to CcjRoundConfig
MODIFY
WalletWasabi.Tests/RegTestFixture.cs
WalletWasabi.Tests/RegTestFixture.cs
@@ -35,7 +35,7 @@ namespace WalletWasabi.Tests
var config = new Config(rpc.Network, authString[0], authString[1]);
- var roundConfig = new CcjRoundConfig(new Money(0.1m, MoneyUnit.BTC), 144, 0.1m, 100, 120, 60, 60, 60);
+ var roundConfig = new CcjRoundConfig(new Money(0.1m, MoneyUnit.BTC), 144, 0.1m, 100, 120, 60, 60, 60, 1);
Global.InitializeAsync(config, roundConfig, rpc).GetAwaiter().GetResult();

MODIFY
WalletWasabi.Tests/RegTests.cs
WalletWasabi.Tests/RegTests.cs
@@ -1468,7 +1468,7 @@ namespace WalletWasabi.Tests
decimal coordinatorFeePercent = 0.2m;
int anonymitySet = 2;
int connectionConfirmationTimeout = 50;
- var roundConfig = new CcjRoundConfig(denomination, 2, coordinatorFeePercent, anonymitySet, 100, connectionConfirmationTimeout, 50, 50);
+ var roundConfig = new CcjRoundConfig(denomination, 2, coordinatorFeePercent, anonymitySet, 100, connectionConfirmationTimeout, 50, 50, 1);
coordinator.UpdateRoundConfig(roundConfig);
coordinator.FailAllRoundsInInputRegistration();

MODIFY
WalletWasabi/ChaumianCoinJoin/CcjRoundConfig.cs
WalletWasabi/ChaumianCoinJoin/CcjRoundConfig.cs
@@ -44,6 +44,9 @@ namespace WalletWasabi.ChaumianCoinJoin
[JsonProperty(PropertyName = "SigningTimeout")]
public long? SigningTimeout { get; internal set; }
+ [JsonProperty(PropertyName = "DosSeverity")]
+ public int? DosSeverity { get; internal set; }
+
public CcjRoundConfig()
{
@@ -54,7 +57,7 @@ namespace WalletWasabi.ChaumianCoinJoin
SetFilePath(filePath);
}
- public CcjRoundConfig(Money denomination, int? confirmationTarget, decimal? coordinatorFeePercent, int? anonymitySet, long? inputRegistrationTimeout, long? connectionConfirmationTimeout, long? outputRegistrationTimeout, long? signingTimeout)
+ public CcjRoundConfig(Money denomination, int? confirmationTarget, decimal? coordinatorFeePercent, int? anonymitySet, long? inputRegistrationTimeout, long? connectionConfirmationTimeout, long? outputRegistrationTimeout, long? signingTimeout, int? dosSeverity)
{
FilePath = null;
Denomination = Guard.NotNull(nameof(denomination), denomination);
@@ -65,6 +68,7 @@ namespace WalletWasabi.ChaumianCoinJoin
ConnectionConfirmationTimeout = Guard.NotNull(nameof(connectionConfirmationTimeout), connectionConfirmationTimeout);
OutputRegistrationTimeout = Guard.NotNull(nameof(outputRegistrationTimeout), outputRegistrationTimeout);
SigningTimeout = Guard.NotNull(nameof(signingTimeout), signingTimeout);
+ DosSeverity = Guard.NotNull(nameof(dosSeverity), dosSeverity);
}
/// <inheritdoc />
@@ -91,6 +95,7 @@ namespace WalletWasabi.ChaumianCoinJoin
ConnectionConfirmationTimeout = 60;
OutputRegistrationTimeout = 60;
SigningTimeout = 60;
+ DosSeverity = 1;
if (!File.Exists(FilePath))
{
@@ -109,6 +114,7 @@ namespace WalletWasabi.ChaumianCoinJoin
ConnectionConfirmationTimeout = config.ConnectionConfirmationTimeout ?? ConnectionConfirmationTimeout;
OutputRegistrationTimeout = config.OutputRegistrationTimeout ?? OutputRegistrationTimeout;
SigningTimeout = config.SigningTimeout ?? SigningTimeout;
+ DosSeverity = config.DosSeverity ?? DosSeverity;
}
await ToFileAsync();
@@ -159,6 +165,10 @@ namespace WalletWasabi.ChaumianCoinJoin
{
return true;
}
+ if (DosSeverity != config.DosSeverity)
+ {
+ return true;
+ }
return false;
}

Add DosSeverity to CcjRoundConfig