Reuse already defined const
MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Client/CoinJoinCoinSelectionTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Client/CoinJoinCoinSelectionTests.cs
@@ -4,6 +4,7 @@ using NBitcoin;
using WalletWasabi.Blockchain.Keys;
using WalletWasabi.Blockchain.TransactionOutputs;
using WalletWasabi.Crypto.Randomness;
+using WalletWasabi.Helpers;
using WalletWasabi.Tests.Helpers;
using WalletWasabi.WabiSabi.Backend.Rounds;
using WalletWasabi.WabiSabi.Client;
@@ -13,8 +14,6 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Client;
public class CoinJoinCoinSelectionTests
{
- private static readonly Money AllBtc = Money.Coins(21000000m);
-
[Fact]
public void SelectNothingFromEmptySetOfCoins()
{
@@ -25,7 +24,7 @@ public class CoinJoinCoinSelectionTests
consolidationMode: false,
anonScoreTarget: 10,
redCoinIsolation: false,
- liquidityClue: AllBtc,
+ liquidityClue: Constants.MaximumNumberOfBitcoinsMoney,
ConfigureRng(5));
Assert.Empty(coins);
@@ -48,7 +47,7 @@ public class CoinJoinCoinSelectionTests
consolidationMode: false,
anonScoreTarget: AnonymitySet,
redCoinIsolation: false,
- liquidityClue: AllBtc,
+ liquidityClue: Constants.MaximumNumberOfBitcoinsMoney,
ConfigureRng(5));
Assert.Empty(coins);
@@ -73,7 +72,7 @@ public class CoinJoinCoinSelectionTests
consolidationMode: true,
anonScoreTarget: AnonymitySet,
redCoinIsolation: false,
- liquidityClue: AllBtc,
+ liquidityClue: Constants.MaximumNumberOfBitcoinsMoney,
ConfigureRng(5));
Assert.Contains(smallerAnonCoin, coins);
@@ -97,7 +96,7 @@ public class CoinJoinCoinSelectionTests
consolidationMode: false,
anonScoreTarget: AnonymitySet,
redCoinIsolation: false,
- liquidityClue: AllBtc,
+ liquidityClue: Constants.MaximumNumberOfBitcoinsMoney,
ConfigureRng(1));
Assert.Single(coins);
@@ -122,7 +121,7 @@ public class CoinJoinCoinSelectionTests
consolidationMode: false,
anonScoreTarget: AnonymitySet,
redCoinIsolation: false,
- liquidityClue: AllBtc,
+ liquidityClue: Constants.MaximumNumberOfBitcoinsMoney,
ConfigureRng(1));
Assert.Equal(2, coins.Count);
@@ -146,7 +145,7 @@ public class CoinJoinCoinSelectionTests
consolidationMode: true,
anonScoreTarget: AnonymitySet,
redCoinIsolation: false,
- liquidityClue: AllBtc,
+ liquidityClue: Constants.MaximumNumberOfBitcoinsMoney,
ConfigureRng(1));
Assert.Equal(2, coins.Count);

MODIFY
WalletWasabi/Helpers/Constants.cs
WalletWasabi/Helpers/Constants.cs
@@ -32,6 +32,7 @@ public static class Constants
public const long MaximumNumberOfSatoshis = 2099999997690000;
public const decimal MaximumNumberOfBitcoins = 20999999.9769m;
+ public static readonly Money MaximumNumberOfBitcoinsMoney = Money.Coins(MaximumNumberOfBitcoins);
public const int FastestConfirmationTarget = 1;
public const int TwentyMinutesConfirmationTarget = 2;

Reuse already defined const