BitcoinStore: Modify test code to reflect BitcoinStore's constructor changes
MODIFY
WalletWasabi.Gui/Global.cs
WalletWasabi.Gui/Global.cs
@@ -107,10 +107,7 @@ namespace WalletWasabi.Gui
BitcoinStore = new BitcoinStore(
Path.Combine(DataDir, "BitcoinStore"), Network,
- new IndexStore(),
- new AllTransactionStore(),
- new SmartHeaderChain(),
- new MempoolService()
+ new IndexStore(), new AllTransactionStore(), new SmartHeaderChain(), new MempoolService()
);
}
}

MODIFY
WalletWasabi.Tests/IntegrationTests/P2pTests.cs
WalletWasabi.Tests/IntegrationTests/P2pTests.cs
@@ -11,7 +11,9 @@ using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using WalletWasabi.Backend.Models;
+using WalletWasabi.Blockchain.Blocks;
using WalletWasabi.Blockchain.Keys;
+using WalletWasabi.Blockchain.Mempool;
using WalletWasabi.Blockchain.Transactions;
using WalletWasabi.CoinJoin.Client.Clients;
using WalletWasabi.Crypto;
@@ -55,8 +57,9 @@ namespace WalletWasabi.Tests.IntegrationTests
}
var dataDir = Path.Combine(Global.Instance.DataDir, EnvironmentHelpers.GetCallerFileName());
- BitcoinStore bitcoinStore = new BitcoinStore();
- await bitcoinStore.InitializeAsync(Path.Combine(dataDir, EnvironmentHelpers.GetMethodName()), network);
+ BitcoinStore bitcoinStore = new BitcoinStore(Path.Combine(dataDir, EnvironmentHelpers.GetMethodName()), network,
+ new IndexStore(), new AllTransactionStore(), new SmartHeaderChain(), new MempoolService());
+ await bitcoinStore.InitializeAsync();
var addressManagerFolderPath = Path.Combine(dataDir, "AddressManager");
var addressManagerFilePath = Path.Combine(addressManagerFolderPath, $"AddressManager{network}.dat");

MODIFY
WalletWasabi.Tests/RegressionTests/Common.cs
WalletWasabi.Tests/RegressionTests/Common.cs
@@ -9,6 +9,9 @@ using System.Threading.Tasks;
using WalletWasabi.Backend.Models;
using WalletWasabi.Backend.Models.Responses;
using WalletWasabi.BitcoinCore;
+using WalletWasabi.Blockchain.Blocks;
+using WalletWasabi.Blockchain.Mempool;
+using WalletWasabi.Blockchain.Transactions;
using WalletWasabi.CoinJoin.Coordinator;
using WalletWasabi.Helpers;
using WalletWasabi.Models;
@@ -85,9 +88,10 @@ namespace WalletWasabi.Tests.RegressionTests
var network = global.RpcClient.Network;
var serviceConfiguration = new ServiceConfiguration(MixUntilAnonymitySet.PrivacyLevelSome.ToString(), 2, 21, 50, regTestFixture.BackendRegTestNode.P2pEndPoint, Money.Coins(Constants.DefaultDustThreshold));
- var bitcoinStore = new BitcoinStore();
+
var dir = GetWorkDir(callerFilePath, callerMemberName);
- await bitcoinStore.InitializeAsync(dir, network);
+ var bitcoinStore = new BitcoinStore(dir, network, new IndexStore(), new AllTransactionStore(), new SmartHeaderChain(), new MempoolService());
+ await bitcoinStore.InitializeAsync();
return ("password", global.RpcClient, network, global.Coordinator, serviceConfiguration, bitcoinStore, global);
}
}

MODIFY
WalletWasabi.Tests/UnitTests/BitcoinCore/P2pBasedTests.cs
WalletWasabi.Tests/UnitTests/BitcoinCore/P2pBasedTests.cs
@@ -8,6 +8,7 @@ using System.Threading;
using System.Threading.Tasks;
using WalletWasabi.BitcoinCore;
using WalletWasabi.Blockchain.Blocks;
+using WalletWasabi.Blockchain.Mempool;
using WalletWasabi.Blockchain.Transactions;
using WalletWasabi.Helpers;
using WalletWasabi.Services;
@@ -30,9 +31,9 @@ namespace WalletWasabi.Tests.UnitTests.BitcoinCore
{
var network = coreNode.Network;
var rpc = coreNode.RpcClient;
- var bitcoinStore = new BitcoinStore();
var dir = Path.Combine(Global.Instance.DataDir, EnvironmentHelpers.GetCallerFileName(), EnvironmentHelpers.GetMethodName());
- await bitcoinStore.InitializeAsync(dir, network);
+ var bitcoinStore = new BitcoinStore(dir, network, new IndexStore(), new AllTransactionStore(), new SmartHeaderChain(), new MempoolService());
+ await bitcoinStore.InitializeAsync();
await rpc.GenerateAsync(101);

BitcoinStore: Modify test code to reflect BitcoinStore's constructor changes