Add OneDayConfirmationTarget (144) as const
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/SendTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/SendTabViewModel.cs
@@ -567,14 +567,14 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
{
ConfirmationExpectedText = $"{feeTarget}0 minutes";
}
- else if (feeTarget >= 7 && feeTarget <= 144) // hours
+ else if (feeTarget >= 7 && feeTarget <= Constants.OneDayConfirmationTarget) // hours
{
var h = feeTarget / 6;
ConfirmationExpectedText = $"{h} {IfPlural(h, "hour", "hours")}";
}
else if (feeTarget >= 145 && feeTarget < Constants.SevenDaysConfirmationTarget) // days
{
- var d = feeTarget / 144;
+ var d = feeTarget / Constants.OneDayConfirmationTarget;
ConfirmationExpectedText = $"{d} {IfPlural(d, "day", "days")}";
}
else if (feeTarget == 10008)

MODIFY
WalletWasabi.Tests/RegTests.cs
WalletWasabi.Tests/RegTests.cs
@@ -232,7 +232,7 @@ namespace WalletWasabi.Tests
(string password, RPCClient rpc, Network network, CcjCoordinator coordinator, ServiceConfiguration serviceConfiguration, BitcoinStore bitcoinStore) = await InitializeTestEnvironmentAsync(1);
var estimations = await rpc.EstimateAllFeeAsync(EstimateSmartFeeMode.Conservative, simulateIfRegTest: true, tolerateBitcoinCoreBrainfuck: true);
- Assert.Equal(144, estimations.Estimations.Count);
+ Assert.Equal(Constants.OneDayConfirmationTarget, estimations.Estimations.Count);
Assert.True(estimations.Estimations.First().Key < estimations.Estimations.Last().Key);
Assert.True(estimations.Estimations.First().Value > estimations.Estimations.Last().Value);
Assert.Equal(EstimateSmartFeeMode.Conservative, estimations.Type);
@@ -950,7 +950,7 @@ namespace WalletWasabi.Tests
#region MediumFee
- res = wallet.BuildTransaction(password, new[] { new WalletService.Operation(receive, amountToSend, "foo") }, 144, allowUnconfirmed: true);
+ res = wallet.BuildTransaction(password, new[] { new WalletService.Operation(receive, amountToSend, "foo") }, Constants.OneDayConfirmationTarget, allowUnconfirmed: true);
Assert.Equal(2, res.InnerWalletOutputs.Count());
Assert.Empty(res.OuterWalletOutputs);
@@ -2813,7 +2813,7 @@ namespace WalletWasabi.Tests
decimal coordinatorFeePercent = 0.003m;
int anonymitySet = 100;
int connectionConfirmationTimeout = 120;
- var roundConfig = new CcjRoundConfig(denomination, 144, 0.7, coordinatorFeePercent, anonymitySet, 240, connectionConfirmationTimeout, 50, 50, 1, 24, true, 11);
+ var roundConfig = new CcjRoundConfig(denomination, Constants.OneDayConfirmationTarget, 0.7, coordinatorFeePercent, anonymitySet, 240, connectionConfirmationTimeout, 50, 50, 1, 24, true, 11);
coordinator.UpdateRoundConfig(roundConfig);
coordinator.AbortAllRoundsInInputRegistration(nameof(RegTests), "");
await rpc.GenerateAsync(100); // So to make sure we have enough money.

MODIFY
WalletWasabi.Tests/XunitConfiguration/RegTestFixture.cs
WalletWasabi.Tests/XunitConfiguration/RegTestFixture.cs
@@ -6,6 +6,7 @@ using System.Net;
using System.Threading;
using System.Threading.Tasks;
using WalletWasabi.Backend;
+using WalletWasabi.Helpers;
using WalletWasabi.Logging;
using WalletWasabi.Models.ChaumianCoinJoin;
using WalletWasabi.Tests.NodeBuilding;
@@ -33,7 +34,7 @@ namespace WalletWasabi.Tests.XunitConfiguration
var config = new Config(rpc.Network, rpc.Authentication, IPAddress.Loopback.ToString(), IPAddress.Loopback.ToString(), BackendRegTestNode.Endpoint.Address.ToString(), Network.Main.DefaultPort, Network.TestNet.DefaultPort, BackendRegTestNode.Endpoint.Port);
- var roundConfig = new CcjRoundConfig(Money.Coins(0.1m), 144, 0.7, 0.1m, 100, 120, 60, 60, 60, 1, 24, true, 11);
+ var roundConfig = new CcjRoundConfig(Money.Coins(0.1m), Constants.OneDayConfirmationTarget, 0.7, 0.1m, 100, 120, 60, 60, 60, 1, 24, true, 11);
Backend.Global.Instance.InitializeAsync(config, roundConfig, rpc).GetAwaiter().GetResult();

MODIFY
WalletWasabi/Helpers/Constants.cs
WalletWasabi/Helpers/Constants.cs
@@ -74,6 +74,7 @@ namespace WalletWasabi.Helpers
public const string ChangeOfSpecialLabelEnd = ")";
public const int BigFileReadWriteBufferSize = 1 * 1024 * 1024;
+ public const int OneDayConfirmationTarget = 144;
public const int SevenDaysConfirmationTarget = 1008;
}
}

MODIFY
WalletWasabi/Models/ChaumianCoinJoin/CcjRoundConfig.cs
WalletWasabi/Models/ChaumianCoinJoin/CcjRoundConfig.cs
@@ -101,7 +101,7 @@ namespace WalletWasabi.Models.ChaumianCoinJoin
AssertFilePathSet();
Denomination = Money.Coins(0.1m);
- ConfirmationTarget = 144; // 1 day
+ ConfirmationTarget = Constants.OneDayConfirmationTarget; // 1 day
ConfirmationTargetReductionRate = 0.7;
CoordinatorFeePercent = 0.003m; // Coordinator fee percent is per anonymity set.
AnonymitySet = 100;

Add OneDayConfirmationTarget (144) as const