Skip to content

Commit

Permalink
Remove MempoolMirror (WalletWasabi#13345)
Browse files Browse the repository at this point in the history
  • Loading branch information
lontivero authored Aug 27, 2024
1 parent 171f1b5 commit a04b138
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 501 deletions.
3 changes: 0 additions & 3 deletions WalletWasabi.Backend/Controllers/BlockchainController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Runtime.InteropServices.JavaScript;
using System.Threading;
using System.Threading.Tasks;
using WalletWasabi.Backend.Models.Responses;
using WalletWasabi.BitcoinCore.Mempool;
using WalletWasabi.BitcoinCore.Rpc;
using WalletWasabi.Blockchain.Analysis.FeesEstimation;
using WalletWasabi.Cache;
Expand Down Expand Up @@ -40,7 +38,6 @@ public BlockchainController(IMemoryCache memoryCache, Global global)

private IRPCClient RpcClient => Global.RpcClient;
private Network Network => Global.Config.Network;
private MempoolMirror Mempool => Global.MempoolMirror;

public IdempotencyRequestCache Cache { get; }

Expand Down
6 changes: 0 additions & 6 deletions WalletWasabi.Backend/Global.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.Threading;
using System.Threading.Tasks;
using WalletWasabi.BitcoinCore;
using WalletWasabi.BitcoinCore.Mempool;
using WalletWasabi.BitcoinCore.Rpc;
using WalletWasabi.Blockchain.BlockFilters;
using WalletWasabi.Blockchain.Blocks;
Expand Down Expand Up @@ -45,8 +44,6 @@ public Global(string dataDir, IRPCClient rpcClient, Config config)
var indexBuilderServiceDir = Path.Combine(DataDir, "IndexBuilderService");
var indexFilePath = Path.Combine(indexBuilderServiceDir, $"Index{RpcClient.Network}.dat");
IndexBuilderService = new(RpcClient, HostedServices.Get<BlockNotifier>());

MempoolMirror = new MempoolMirror(RpcClient, P2pNode);
}

public string DataDir { get; }
Expand All @@ -64,7 +61,6 @@ public Global(string dataDir, IRPCClient rpcClient, Config config)
private CoordinatorParameters CoordinatorParameters { get; }

public WabiSabiCoordinator? WabiSabiCoordinator { get; private set; }
public MempoolMirror MempoolMirror { get; }

public async Task InitializeAsync(CancellationToken cancel)
{
Expand All @@ -74,8 +70,6 @@ public async Task InitializeAsync(CancellationToken cancel)
// Make sure P2P works.
await P2pNode.ConnectAsync(cancel).ConfigureAwait(false);

HostedServices.Register<MempoolMirror>(() => MempoolMirror, "Full Node Mempool Mirror");

var blockNotifier = HostedServices.Get<BlockNotifier>();

var coinJoinScriptStore = CoinJoinScriptStore.LoadFromFile(CoordinatorParameters.CoinJoinScriptStoreFilePath);
Expand Down
8 changes: 0 additions & 8 deletions WalletWasabi.Daemon/Global.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@
using System.Threading.Tasks;
using WalletWasabi.BitcoinCore;
using WalletWasabi.BitcoinCore.Endpointing;
using WalletWasabi.BitcoinCore.Mempool;
using WalletWasabi.BitcoinCore.Monitoring;
using WalletWasabi.BitcoinP2p;
using WalletWasabi.Blockchain.Analysis.FeesEstimation;
using WalletWasabi.Blockchain.BlockFilters;
using WalletWasabi.Blockchain.Blocks;
using WalletWasabi.Blockchain.Mempool;
using WalletWasabi.Blockchain.TransactionBroadcasting;
Expand Down Expand Up @@ -395,12 +393,6 @@ private void RegisterLocalNodeDependentComponents(CoreNode coreNode)
HostedServices.Register<BlockNotifier>(() => new BlockNotifier(coreNode.RpcClient, coreNode.P2pNode), "Block Notifier");
HostedServices.Register<RpcMonitor>(() => new RpcMonitor(TimeSpan.FromSeconds(7), coreNode.RpcClient), "RPC Monitor");
HostedServices.Register<RpcFeeProvider>(() => new RpcFeeProvider(TimeSpan.FromMinutes(1), coreNode.RpcClient, HostedServices.Get<RpcMonitor>()), "RPC Fee Provider");
if (!Config.BlockOnlyMode)
{
HostedServices.Register<MempoolMirror>(
() => new MempoolMirror(coreNode.RpcClient, coreNode.P2pNode),
"Full Node Mempool Mirror");
}
}

private void RegisterFeeRateProviders()
Expand Down
245 changes: 0 additions & 245 deletions WalletWasabi.Tests/UnitTests/BitcoinCore/MempoolMirrorTests.cs

This file was deleted.

73 changes: 0 additions & 73 deletions WalletWasabi.Tests/UnitTests/BitcoinCore/MempoolTests.cs

This file was deleted.

Loading

0 comments on commit a04b138

Please sign in to comment.