LocalBlockProvider: Change ctor signature
MODIFY
WalletWasabi.Fluent/Global.cs
WalletWasabi.Fluent/Global.cs
@@ -190,7 +190,7 @@ public class Global
var blockProvider = new SmartBlockProvider(
BitcoinStore.BlockRepository,
- new LocalBlockProvider(BitcoinCoreNode, HttpClientFactory, Config.ServiceConfiguration, Network),
+ new LocalBlockProvider(Network, Config.ServiceConfiguration, BitcoinCoreNode, HttpClientFactory),
new P2pBlockProvider(HostedServices.Get<P2pNetwork>().Nodes, HttpClientFactory, Network),
Cache);

MODIFY
WalletWasabi.Tests/IntegrationTests/P2pTests.cs
WalletWasabi.Tests/IntegrationTests/P2pTests.cs
@@ -111,7 +111,7 @@ public class P2pTests
IRepository<uint256, Block> blockRepository = bitcoinStore.BlockRepository;
IBlockProvider blockProvider = new SmartBlockProvider(
blockRepository,
- new LocalBlockProvider(null, httpClientFactory, serviceConfig, network),
+ new LocalBlockProvider(network, serviceConfig, null, httpClientFactory),
new P2pBlockProvider(nodes, httpClientFactory, network),
cache);

MODIFY
WalletWasabi.Tests/RegressionTests/BuildTests.cs
WalletWasabi.Tests/RegressionTests/BuildTests.cs
@@ -66,7 +66,7 @@ public class BuildTests
var blockProvider = new SmartBlockProvider(
bitcoinStore.BlockRepository,
- localBlockProvider: new LocalBlockProvider(coreNode: null, httpClientFactory, serviceConfiguration, network),
+ localBlockProvider: new LocalBlockProvider(network, serviceConfiguration, coreNode: null, httpClientFactory: httpClientFactory),
p2PBlockProvider: new P2pBlockProvider(nodes, httpClientFactory, network),
cache);
@@ -223,7 +223,7 @@ public class BuildTests
var blockProvider = new SmartBlockProvider(
bitcoinStore.BlockRepository,
- localBlockProvider: new LocalBlockProvider(coreNode: null, httpClientFactory, serviceConfiguration, network),
+ localBlockProvider: new LocalBlockProvider(network, serviceConfiguration, coreNode: null, httpClientFactory: httpClientFactory),
p2PBlockProvider: new P2pBlockProvider(nodes, httpClientFactory, network),
cache);

MODIFY
WalletWasabi.Tests/RegressionTests/SendTests.cs
WalletWasabi.Tests/RegressionTests/SendTests.cs
@@ -64,7 +64,7 @@ public class SendTests
var blockProvider = new SmartBlockProvider(
bitcoinStore.BlockRepository,
- new LocalBlockProvider(null, httpClientFactory, serviceConfiguration, network),
+ new LocalBlockProvider(network, serviceConfiguration, null, httpClientFactory),
new P2pBlockProvider(nodes, httpClientFactory, network),
cache);
@@ -546,7 +546,7 @@ public class SendTests
var blockProvider = new SmartBlockProvider(
bitcoinStore.BlockRepository,
- new LocalBlockProvider(null, httpClientFactory, serviceConfiguration, network),
+ new LocalBlockProvider(network, serviceConfiguration, null, httpClientFactory),
new P2pBlockProvider(nodes, httpClientFactory, network),
cache);
@@ -724,7 +724,7 @@ public class SendTests
var blockProvider = new SmartBlockProvider(
bitcoinStore.BlockRepository,
- new LocalBlockProvider(null, httpClientFactory, serviceConfiguration, network),
+ new LocalBlockProvider(network, serviceConfiguration, null, httpClientFactory),
new P2pBlockProvider(nodes, httpClientFactory, network),
cache);

MODIFY
WalletWasabi.Tests/RegressionTests/WalletTests.cs
WalletWasabi.Tests/RegressionTests/WalletTests.cs
@@ -258,7 +258,7 @@ public class WalletTests
SmartBlockProvider blockProvider = new(
blockRepository,
- new LocalBlockProvider(null, httpClientFactory, serviceConfiguration, network),
+ new LocalBlockProvider(network, serviceConfiguration, null, httpClientFactory),
new P2pBlockProvider(nodes, httpClientFactory, network),
cache);

MODIFY
WalletWasabi/Wallets/LocalBlockProvider.cs
WalletWasabi/Wallets/LocalBlockProvider.cs
@@ -16,7 +16,7 @@ namespace WalletWasabi.Wallets;
public class LocalBlockProvider : IBlockProvider
{
- public LocalBlockProvider(CoreNode? coreNode, HttpClientFactory httpClientFactory, ServiceConfiguration serviceConfiguration, Network network)
+ public LocalBlockProvider(Network network, ServiceConfiguration serviceConfiguration, CoreNode? coreNode, HttpClientFactory httpClientFactory)
{
CoreNode = coreNode;
Network = network;
@@ -144,6 +144,7 @@ public class LocalBlockProvider : IBlockProvider
}
return null;
}
+
private void DisconnectDisposeNullLocalBitcoinCoreNode()
{
if (LocalBitcoinCoreNode is { })

LocalBlockProvider: Change ctor signature