Remaining occurrences.
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/SendTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/SendTabViewModel.cs
@@ -101,7 +101,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
}
}
- IHttpClient httpClient = Global.Synchronizer.WasabiClientFactory.NewHttpClient(() => payjoinEndPointUri, isolateStream: false);
+ IHttpClient httpClient = Global.Synchronizer.HttpClientFactory.NewHttpClient(() => payjoinEndPointUri, isolateStream: false);
return new PayjoinClient(payjoinEndPointUri, httpClient);
}

MODIFY
WalletWasabi.Gui/Global.cs
WalletWasabi.Gui/Global.cs
@@ -96,11 +96,11 @@ namespace WalletWasabi.Gui
BitcoinStore = new BitcoinStore(indexStore, transactionStore, mempoolService, blocks);
- HttpClientFactory wasabiClientFactory = Config.UseTor
+ HttpClientFactory httpClientFactory = Config.UseTor
? new HttpClientFactory(Config.TorSocks5EndPoint, backendUriGetter: () => Config.GetCurrentBackendUri())
: new HttpClientFactory(torEndPoint: null, backendUriGetter: () => Config.GetFallbackBackendUri());
- Synchronizer = new WasabiSynchronizer(Network, BitcoinStore, wasabiClientFactory);
+ Synchronizer = new WasabiSynchronizer(Network, BitcoinStore, httpClientFactory);
LegalChecker = new(DataDir);
}
}

MODIFY
WalletWasabi.Tests/IntegrationTests/P2pTests.cs
WalletWasabi.Tests/IntegrationTests/P2pTests.cs
@@ -94,8 +94,8 @@ namespace WalletWasabi.Tests.IntegrationTests
using var nodes = new NodesGroup(network, connectionParameters, requirements: Constants.NodeRequirements);
KeyManager keyManager = KeyManager.CreateNew(out _, "password");
- HttpClientFactory wasabiClientFactory = new HttpClientFactory(Common.TorSocks5Endpoint, backendUriGetter: () => new Uri("http://localhost:12345"));
- WasabiSynchronizer syncer = new WasabiSynchronizer(network, bitcoinStore, wasabiClientFactory);
+ HttpClientFactory httpClientFactory = new HttpClientFactory(Common.TorSocks5Endpoint, backendUriGetter: () => new Uri("http://localhost:12345"));
+ WasabiSynchronizer syncer = new WasabiSynchronizer(network, bitcoinStore, httpClientFactory);
ServiceConfiguration serviceConfig = new ServiceConfiguration(MixUntilAnonymitySet.PrivacyLevelStrong.ToString(), 2, 21, 50, new IPEndPoint(IPAddress.Loopback, network.DefaultPort), Money.Coins(Constants.DefaultDustThreshold));
CachedBlockProvider blockProvider = new CachedBlockProvider(
new P2pBlockProvider(nodes, null, syncer, serviceConfig, network),

MODIFY
WalletWasabi.Tests/RegressionTests/BuildTests.cs
WalletWasabi.Tests/RegressionTests/BuildTests.cs
@@ -52,8 +52,8 @@ namespace WalletWasabi.Tests.RegressionTests
node.Behaviors.Add(bitcoinStore.CreateUntrustedP2pBehavior());
// 3. Create wasabi synchronizer service.
- var wasabiClientFactory = new HttpClientFactory(torEndPoint: null, backendUriGetter: () => new Uri(RegTestFixture.BackendEndPoint));
- var synchronizer = new WasabiSynchronizer(rpc.Network, bitcoinStore, wasabiClientFactory);
+ var httpClientFactory = new HttpClientFactory(torEndPoint: null, backendUriGetter: () => new Uri(RegTestFixture.BackendEndPoint));
+ var synchronizer = new WasabiSynchronizer(rpc.Network, bitcoinStore, httpClientFactory);
// 4. Create key manager service.
var keyManager = KeyManager.CreateNew(out _, password);
@@ -216,8 +216,8 @@ namespace WalletWasabi.Tests.RegressionTests
node.Behaviors.Add(bitcoinStore.CreateUntrustedP2pBehavior());
// 3. Create wasabi synchronizer service.
- var wasabiClientFactory = new HttpClientFactory(torEndPoint: null, backendUriGetter: () => new Uri(RegTestFixture.BackendEndPoint));
- var synchronizer = new WasabiSynchronizer(rpc.Network, bitcoinStore, wasabiClientFactory);
+ var httpClientFactory = new HttpClientFactory(torEndPoint: null, backendUriGetter: () => new Uri(RegTestFixture.BackendEndPoint));
+ var synchronizer = new WasabiSynchronizer(rpc.Network, bitcoinStore, httpClientFactory);
// 4. Create key manager service.
var keyManager = KeyManager.CreateNew(out _, password);

MODIFY
WalletWasabi.Tests/RegressionTests/CoinJoinTests.cs
WalletWasabi.Tests/RegressionTests/CoinJoinTests.cs
@@ -1073,8 +1073,8 @@ namespace WalletWasabi.Tests.RegressionTests
{
(string password, IRPCClient rpc, Network network, Coordinator coordinator, _, BitcoinStore bitcoinStore, _) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
- var wasabiClientFactory = new HttpClientFactory(torEndPoint: null, backendUriGetter: () => new Uri(RegTestFixture.BackendEndPoint));
- var synchronizer = new WasabiSynchronizer(network, bitcoinStore, wasabiClientFactory);
+ var httpClientFactory = new HttpClientFactory(torEndPoint: null, backendUriGetter: () => new Uri(RegTestFixture.BackendEndPoint));
+ var synchronizer = new WasabiSynchronizer(network, bitcoinStore, httpClientFactory);
synchronizer.Start(requestInterval: TimeSpan.FromSeconds(3), TimeSpan.FromSeconds(5), 10000); // Start wasabi synchronizer service.
Money denomination = Money.Coins(0.9m);
@@ -1179,8 +1179,8 @@ namespace WalletWasabi.Tests.RegressionTests
{
(string password, IRPCClient rpc, Network network, Coordinator coordinator, _, BitcoinStore bitcoinStore, _) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
- var wasabiClientFactory = new HttpClientFactory(torEndPoint: null, backendUriGetter: () => new Uri(RegTestFixture.BackendEndPoint));
- var synchronizer = new WasabiSynchronizer(network, bitcoinStore, wasabiClientFactory);
+ var httpClientFactory = new HttpClientFactory(torEndPoint: null, backendUriGetter: () => new Uri(RegTestFixture.BackendEndPoint));
+ var synchronizer = new WasabiSynchronizer(network, bitcoinStore, httpClientFactory);
synchronizer.Start(requestInterval: TimeSpan.FromSeconds(3), TimeSpan.FromSeconds(5), 10000); // Start wasabi synchronizer service.
Money denomination = Money.Coins(0.1m);
@@ -1377,11 +1377,11 @@ namespace WalletWasabi.Tests.RegressionTests
node2.Behaviors.Add(bitcoinStore.CreateUntrustedP2pBehavior());
// 3. Create wasabi synchronizer service.
- var wasabiClientFactory = new HttpClientFactory(torEndPoint: null, backendUriGetter: () => new Uri(RegTestFixture.BackendEndPoint));
- var synchronizer = new WasabiSynchronizer(network, bitcoinStore, wasabiClientFactory);
+ var httpClientFactory = new HttpClientFactory(torEndPoint: null, backendUriGetter: () => new Uri(RegTestFixture.BackendEndPoint));
+ var synchronizer = new WasabiSynchronizer(network, bitcoinStore, httpClientFactory);
var indexFilePath2 = Path.Combine(Helpers.Common.GetWorkDir(), $"Index{network}2.dat");
- var synchronizer2 = new WasabiSynchronizer(network, bitcoinStore, wasabiClientFactory);
+ var synchronizer2 = new WasabiSynchronizer(network, bitcoinStore, httpClientFactory);
// 4. Create key manager service.
var keyManager = KeyManager.CreateNew(out _, password);

MODIFY
WalletWasabi.Tests/RegressionTests/SendTests.cs
WalletWasabi.Tests/RegressionTests/SendTests.cs
@@ -49,8 +49,8 @@ namespace WalletWasabi.Tests.RegressionTests
node.Behaviors.Add(bitcoinStore.CreateUntrustedP2pBehavior());
// 3. Create wasabi synchronizer service.
- var wasabiClientFactory = new HttpClientFactory(torEndPoint: null, backendUriGetter: () => new Uri(RegTestFixture.BackendEndPoint));
- var synchronizer = new WasabiSynchronizer(rpc.Network, bitcoinStore, wasabiClientFactory);
+ var httpClientFactory = new HttpClientFactory(torEndPoint: null, backendUriGetter: () => new Uri(RegTestFixture.BackendEndPoint));
+ var synchronizer = new WasabiSynchronizer(rpc.Network, bitcoinStore, httpClientFactory);
// 4. Create key manager service.
var keyManager = KeyManager.CreateNew(out _, password);
@@ -529,8 +529,8 @@ namespace WalletWasabi.Tests.RegressionTests
node.Behaviors.Add(bitcoinStore.CreateUntrustedP2pBehavior());
// 3. Create wasabi synchronizer service.
- var wasabiClientFactory = new HttpClientFactory(torEndPoint: null, backendUriGetter: () => new Uri(RegTestFixture.BackendEndPoint));
- var synchronizer = new WasabiSynchronizer(rpc.Network, bitcoinStore, wasabiClientFactory);
+ var httpClientFactory = new HttpClientFactory(torEndPoint: null, backendUriGetter: () => new Uri(RegTestFixture.BackendEndPoint));
+ var synchronizer = new WasabiSynchronizer(rpc.Network, bitcoinStore, httpClientFactory);
// 4. Create key manager service.
var keyManager = KeyManager.CreateNew(out _, password);
@@ -703,8 +703,8 @@ namespace WalletWasabi.Tests.RegressionTests
node.Behaviors.Add(bitcoinStore.CreateUntrustedP2pBehavior());
// 3. Create wasabi synchronizer service.
- var wasabiClientFactory = new HttpClientFactory(torEndPoint: null, backendUriGetter: () => new Uri(RegTestFixture.BackendEndPoint));
- var synchronizer = new WasabiSynchronizer(rpc.Network, bitcoinStore, wasabiClientFactory);
+ var httpClientFactory = new HttpClientFactory(torEndPoint: null, backendUriGetter: () => new Uri(RegTestFixture.BackendEndPoint));
+ var synchronizer = new WasabiSynchronizer(rpc.Network, bitcoinStore, httpClientFactory);
// 4. Create key manager service.
var keyManager = KeyManager.CreateNew(out _, password);

MODIFY
WalletWasabi.Tests/RegressionTests/WalletTests.cs
WalletWasabi.Tests/RegressionTests/WalletTests.cs
@@ -52,8 +52,8 @@ namespace WalletWasabi.Tests.RegressionTests
{
(_, IRPCClient rpc, _, _, _, BitcoinStore bitcoinStore, _) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
- var wasabiClientFactory = new HttpClientFactory(torEndPoint: null, backendUriGetter: () => new Uri(RegTestFixture.BackendEndPoint));
- var synchronizer = new WasabiSynchronizer(rpc.Network, bitcoinStore, wasabiClientFactory);
+ var httpClientFactory = new HttpClientFactory(torEndPoint: null, backendUriGetter: () => new Uri(RegTestFixture.BackendEndPoint));
+ var synchronizer = new WasabiSynchronizer(rpc.Network, bitcoinStore, httpClientFactory);
try
{
synchronizer.Start(requestInterval: TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(5), 1000);
@@ -138,8 +138,8 @@ namespace WalletWasabi.Tests.RegressionTests
var node = RegTestFixture.BackendRegTestNode;
- var wasabiClientFactory = new HttpClientFactory(torEndPoint: null, backendUriGetter: () => new Uri(RegTestFixture.BackendEndPoint));
- var synchronizer = new WasabiSynchronizer(rpc.Network, bitcoinStore, wasabiClientFactory);
+ var httpClientFactory = new HttpClientFactory(torEndPoint: null, backendUriGetter: () => new Uri(RegTestFixture.BackendEndPoint));
+ var synchronizer = new WasabiSynchronizer(rpc.Network, bitcoinStore, httpClientFactory);
try
{
@@ -243,8 +243,8 @@ namespace WalletWasabi.Tests.RegressionTests
node.Behaviors.Add(bitcoinStore.CreateUntrustedP2pBehavior());
// 2. Create wasabi synchronizer service.
- var wasabiClientFactory = new HttpClientFactory(torEndPoint: null, backendUriGetter: () => new Uri(RegTestFixture.BackendEndPoint));
- var synchronizer = new WasabiSynchronizer(rpc.Network, bitcoinStore, wasabiClientFactory);
+ var httpClientFactory = new HttpClientFactory(torEndPoint: null, backendUriGetter: () => new Uri(RegTestFixture.BackendEndPoint));
+ var synchronizer = new WasabiSynchronizer(rpc.Network, bitcoinStore, httpClientFactory);
// 3. Create key manager service.
var keyManager = KeyManager.CreateNew(out _, password);

MODIFY
WalletWasabi/Blockchain/Mempool/MempoolService.cs
WalletWasabi/Blockchain/Mempool/MempoolService.cs
@@ -85,7 +85,7 @@ namespace WalletWasabi.Blockchain.Mempool
/// <summary>
/// Tries to perform mempool cleanup with the help of the backend.
/// </summary>
- public async Task<bool> TryPerformMempoolCleanupAsync(HttpClientFactory wasabiClientFactory)
+ public async Task<bool> TryPerformMempoolCleanupAsync(HttpClientFactory httpClientFactory)
{
// If already cleaning, then no need to run it that often.
if (Interlocked.CompareExchange(ref _cleanupInProcess, 1, 0) == 1)
@@ -106,7 +106,7 @@ namespace WalletWasabi.Blockchain.Mempool
Logger.LogInfo("Start cleaning out mempool...");
{
var compactness = 10;
- var allMempoolHashes = await wasabiClientFactory.SharedWasabiClient.GetMempoolHashesAsync(compactness).ConfigureAwait(false);
+ var allMempoolHashes = await httpClientFactory.SharedWasabiClient.GetMempoolHashesAsync(compactness).ConfigureAwait(false);
lock (ProcessedLock)
{

MODIFY
WalletWasabi/Blockchain/TransactionBroadcasting/TransactionBroadcaster.cs
WalletWasabi/Blockchain/TransactionBroadcasting/TransactionBroadcaster.cs
@@ -86,7 +86,7 @@ namespace WalletWasabi.Blockchain.TransactionBroadcasting
private async Task BroadcastTransactionToBackendAsync(SmartTransaction transaction)
{
Logger.LogInfo("Broadcasting with backend...");
- using (TorHttpClient torHttpClient = Synchronizer.WasabiClientFactory.NewBackendTorHttpClient(isolateStream: true))
+ using (TorHttpClient torHttpClient = Synchronizer.HttpClientFactory.NewBackendTorHttpClient(isolateStream: true))
{
var client = new WasabiClient(torHttpClient);

MODIFY
WalletWasabi/CoinJoin/Client/Clients/CoinJoinClient.cs
WalletWasabi/CoinJoin/Client/Clients/CoinJoinClient.cs
@@ -58,7 +58,7 @@ namespace WalletWasabi.CoinJoin.Client.Clients
KeyManager = Guard.NotNull(nameof(keyManager), keyManager);
DestinationKeyManager = KeyManager;
Synchronizer = Guard.NotNull(nameof(synchronizer), synchronizer);
- CcjHostUriAction = Synchronizer.WasabiClientFactory.BackendUriGetter;
+ CcjHostUriAction = Synchronizer.HttpClientFactory.BackendUriGetter;
CoordinatorFeepercentToCheck = null;
ExposedLinks = new ConcurrentDictionary<OutPoint, IEnumerable<HdPubKeyBlindedPair>>();
@@ -425,7 +425,7 @@ namespace WalletWasabi.CoinJoin.Client.Clients
shuffledOutputs.Shuffle();
foreach (var activeOutput in shuffledOutputs)
{
- using (TorHttpClient torHttpClient = Synchronizer.WasabiClientFactory.NewBackendTorHttpClient(isolateStream: true))
+ using (TorHttpClient torHttpClient = Synchronizer.HttpClientFactory.NewBackendTorHttpClient(isolateStream: true))
{
var bobClient = new BobClient(torHttpClient);
if (!await bobClient.PostOutputAsync(ongoingRound.RoundId, activeOutput).ConfigureAwait(false))
@@ -1079,7 +1079,7 @@ namespace WalletWasabi.CoinJoin.Client.Clients
private async Task<AliceClientBase> CreateAliceClientAsync(long roundId, List<OutPoint> registrableCoins, (HdPubKey change, IEnumerable<HdPubKey> actives) outputAddresses)
{
RoundStateResponse4 state;
- HttpClientFactory factory = Synchronizer.WasabiClientFactory;
+ HttpClientFactory factory = Synchronizer.HttpClientFactory;
using (TorHttpClient torHttpClient = factory.NewBackendTorHttpClient(isolateStream: true))
{
@@ -1134,7 +1134,7 @@ namespace WalletWasabi.CoinJoin.Client.Clients
inputProofs.Add(inputProof);
}
- IHttpClient httpClient = Synchronizer.WasabiClientFactory.NewHttpClient(CcjHostUriAction, isolateStream: true);
+ IHttpClient httpClient = Synchronizer.HttpClientFactory.NewHttpClient(CcjHostUriAction, isolateStream: true);
return await AliceClientBase.CreateNewAsync(roundId, registeredAddresses, signerPubKeys, requesters, Network, outputAddresses.change.GetP2wpkhAddress(Network), blindedOutputScriptHashes, inputProofs, httpClient).ConfigureAwait(false);
}
}

MODIFY
WalletWasabi/CoinJoin/Client/CoinJoinProcessor.cs
WalletWasabi/CoinJoin/Client/CoinJoinProcessor.cs
@@ -47,7 +47,7 @@ namespace WalletWasabi.CoinJoin.Client
var txsNotKnownByAWallet = WalletManager.FilterUnknownCoinjoins(unconfirmedCoinJoinHashes);
- var client = Synchronizer.WasabiClientFactory.SharedWasabiClient;
+ var client = Synchronizer.HttpClientFactory.SharedWasabiClient;
var unconfirmedCoinJoins = await client.GetTransactionsAsync(Synchronizer.Network, txsNotKnownByAWallet, CancellationToken.None).ConfigureAwait(false);
foreach (var tx in unconfirmedCoinJoins.Select(x => new SmartTransaction(x, Height.Mempool)))

MODIFY
WalletWasabi/Services/UpdateChecker.cs
WalletWasabi/Services/UpdateChecker.cs
@@ -14,7 +14,7 @@ namespace WalletWasabi.Services
{
Synchronizer = synchronizer;
UpdateStatus = new UpdateStatus(true, true, new Version(), 0);
- WasabiClient = Synchronizer.WasabiClientFactory.SharedWasabiClient;
+ WasabiClient = Synchronizer.HttpClientFactory.SharedWasabiClient;
Synchronizer.PropertyChanged += Synchronizer_PropertyChanged;
}

MODIFY
WalletWasabi/Services/WasabiSynchronizer.cs
WalletWasabi/Services/WasabiSynchronizer.cs
@@ -43,15 +43,15 @@ namespace WalletWasabi.Services
private long _blockRequests; // There are priority requests in queue.
- /// <param name="wasabiClientFactory">The class takes ownership of the instance.</param>
- public WasabiSynchronizer(Network network, BitcoinStore bitcoinStore, HttpClientFactory wasabiClientFactory)
+ /// <param name="httpClientFactory">The class takes ownership of the instance.</param>
+ public WasabiSynchronizer(Network network, BitcoinStore bitcoinStore, HttpClientFactory httpClientFactory)
{
Network = network;
LastResponse = null;
_running = StateNotStarted;
BitcoinStore = bitcoinStore;
- WasabiClientFactory = wasabiClientFactory;
- WasabiClient = wasabiClientFactory.SharedWasabiClient;
+ HttpClientFactory = httpClientFactory;
+ WasabiClient = httpClientFactory.SharedWasabiClient;
StopCts = new CancellationTokenSource();
}
@@ -67,7 +67,7 @@ namespace WalletWasabi.Services
public SynchronizeResponse? LastResponse { get; private set; }
/// <summary><see cref="WasabiSynchronizer"/> is responsible for disposing of this object.</summary>
- public HttpClientFactory WasabiClientFactory { get; }
+ public HttpClientFactory HttpClientFactory { get; }
public WasabiClient WasabiClient { get; }
@@ -408,7 +408,7 @@ namespace WalletWasabi.Services
await Task.Delay(50).ConfigureAwait(false);
}
- WasabiClientFactory.Dispose();
+ HttpClientFactory.Dispose();
StopCts.Dispose();
EnableRequests(); // Enable requests (it's possible something is being blocked outside the class by AreRequestsBlocked.

MODIFY
WalletWasabi/Wallets/P2pBlockProvider.cs
WalletWasabi/Wallets/P2pBlockProvider.cs
@@ -168,9 +168,9 @@ namespace WalletWasabi.Wallets
// If an onion was added must try to use Tor.
// onlyForOnionHosts should connect to it if it's an onion endpoint automatically and non-Tor endpoints through clearnet/localhost
- if (Synchronizer.WasabiClientFactory.IsTorEnabled)
+ if (Synchronizer.HttpClientFactory.IsTorEnabled)
{
- nodeConnectionParameters.TemplateBehaviors.Add(new SocksSettingsBehavior(Synchronizer.WasabiClientFactory.TorEndpoint, onlyForOnionHosts: true, networkCredential: null, streamIsolation: false));
+ nodeConnectionParameters.TemplateBehaviors.Add(new SocksSettingsBehavior(Synchronizer.HttpClientFactory.TorEndpoint, onlyForOnionHosts: true, networkCredential: null, streamIsolation: false));
}
var localEndPoint = ServiceConfiguration.BitcoinCoreEndPoint;

MODIFY
WalletWasabi/Wallets/Wallet.cs
WalletWasabi/Wallets/Wallet.cs
@@ -380,7 +380,7 @@ namespace WalletWasabi.Wallets
}
} while (Synchronizer.AreRequestsBlocked()); // If requests are blocked, delay mempool cleanup, because coinjoin answers are always priority.
- var task = BitcoinStore.MempoolService?.TryPerformMempoolCleanupAsync(Synchronizer.WasabiClientFactory);
+ var task = BitcoinStore.MempoolService?.TryPerformMempoolCleanupAsync(Synchronizer.HttpClientFactory);
if (task is { })
{
@@ -426,7 +426,7 @@ namespace WalletWasabi.Wallets
{
try
{
- var client = Synchronizer.WasabiClientFactory.SharedWasabiClient;
+ var client = Synchronizer.HttpClientFactory.SharedWasabiClient;
var compactness = 10;
var mempoolHashes = await client.GetMempoolHashesAsync(compactness).ConfigureAwait(false);

Remaining occurrences.