Rename and minor fixes
MODIFY
WalletWasabi.Tests/Helpers/ArenaBuilder.cs
WalletWasabi.Tests/Helpers/ArenaBuilder.cs
@@ -3,6 +3,7 @@ using NBitcoin;
using System.Threading;
using System.Threading.Tasks;
using WalletWasabi.BitcoinCore.Rpc;
+using WalletWasabi.WabiSabi;
using WalletWasabi.WabiSabi.Backend;
using WalletWasabi.WabiSabi.Backend.Banning;
using WalletWasabi.WabiSabi.Backend.Rounds;
@@ -34,7 +35,12 @@ public class ArenaBuilder
Network network = Network ?? Network.Main;
InMemoryCoinJoinIdStore coinJoinIdStore = CoinJoinIdStore ?? new();
- Arena arena = new(period, network, config, rpc, prison, coinJoinIdStore);
+ Mock<Arena> mockProcess = new(period, network, config, rpc, prison, coinJoinIdStore, null, null);
+ mockProcess.Setup(p => p.GetMaxSuggestedAmount())
+ .Returns(() => Money.Satoshis(ProtocolConstants.MaxAmountPerAlice));
+ mockProcess.CallBase = true;
+
+ Arena arena = mockProcess.Object;
foreach (var round in rounds)
{

MODIFY
WalletWasabi/WabiSabi/Backend/Rounds/Arena.cs
WalletWasabi/WabiSabi/Backend/Rounds/Arena.cs
@@ -354,13 +354,18 @@ public partial class Arena : PeriodicRunner
Random,
feeRate,
Config.CoordinationFeeRate,
- RoundHelpers.GetMaxSuggestedAmount(ConnectionConfirmationStartedCounter));
+ GetMaxSuggestedAmount());
Round r = new(roundParams);
Rounds.Add(r);
r.LogInfo($"Created round with params: {nameof(RoundParameters.MaxRegistrableAmount)}:'{roundParams.MaxRegistrableAmount}'.");
}
}
+ internal virtual Money GetMaxSuggestedAmount()
+ {
+ return RoundHelpers.GetMaxSuggestedAmount(ConnectionConfirmationStartedCounter);
+ }
+
private void TimeoutRounds()
{
foreach (var expiredRound in Rounds.Where(

MODIFY
WalletWasabi/WabiSabi/Crypto/RoundHasher.cs
WalletWasabi/WabiSabi/Crypto/RoundHasher.cs
@@ -47,7 +47,7 @@ public static class RoundHasher
.Append(ProtocolConstants.RoundMaxAmountCredentialValueStrobeLabel, maxAmountCredentialValue)
.Append(ProtocolConstants.RoundMaxVsizeCredentialValueStrobeLabel, maxVsizeCredentialValue)
.Append(ProtocolConstants.RoundMaxVsizePerAliceStrobeLabel, maxVsizeAllocationPerAlice)
- .Append(ProtocolConstants.RoundMaxSuggestedAmount, maxSuggestedAmount)
+ .Append(ProtocolConstants.RoundMaxSuggestedAmountLabel, maxSuggestedAmount)
.Append(ProtocolConstants.RoundAmountCredentialIssuerParametersStrobeLabel, amountCredentialIssuerParameters)
.Append(ProtocolConstants.RoundVsizeCredentialIssuerParametersStrobeLabel, vsizeCredentialIssuerParameters)
.GetHash();

MODIFY
WalletWasabi/WabiSabi/ProtocolContants.cs
WalletWasabi/WabiSabi/ProtocolContants.cs
@@ -32,7 +32,7 @@ public static class ProtocolConstants
public const string RoundConnectionConfirmationTimeoutStrobeLabel = "connection-confirmation-timeout";
public const string RoundOutputRegistrationTimeoutStrobeLabel = "output-registration-timeout";
public const string RoundTransactionSigningTimeoutStrobeLabel = "transaction-signing-timeout";
- public const string RoundMaxSuggestedAmount = "maximum-suggested-amount";
+ public const string RoundMaxSuggestedAmountLabel = "maximum-suggested-amount";
// Alice hashing labels
public const string AliceStrobeDomain = "alice-parameters";

Rename and minor fixes