Remove Mempool from StatusBarViewModel.cs
MODIFY
WalletWasabi.Gui/Program.cs
WalletWasabi.Gui/Program.cs
@@ -48,7 +48,7 @@ namespace WalletWasabi.Gui
}
Global.InitializeNoWallet();
- statusBar = new StatusBarViewModel(Global.Nodes.ConnectedNodes, Global.MemPoolService, Global.Synchronizer, Global.UpdateChecker);
+ statusBar = new StatusBarViewModel(Global.Nodes.ConnectedNodes, Global.Synchronizer, Global.UpdateChecker);
MainWindowViewModel.Instance.StatusBar = statusBar;

MODIFY
WalletWasabi.Gui/ViewModels/StatusBarViewModel.cs
WalletWasabi.Gui/ViewModels/StatusBarViewModel.cs
@@ -32,7 +32,6 @@ namespace WalletWasabi.Gui.ViewModels
public class StatusBarViewModel : ViewModelBase, IDisposable
{
public NodesCollection Nodes { get; }
- public MemPoolService MemPoolService { get; }
public WasabiSynchronizer Synchronizer { get; }
public UpdateChecker UpdateChecker { get; }
@@ -130,17 +129,6 @@ namespace WalletWasabi.Gui.ViewModels
}
}
- private int _mempool;
-
- public int Mempool
- {
- get { return _mempool; }
- set
- {
- this.RaiseAndSetIfChanged(ref _mempool, value);
- }
- }
-
public string BtcPrice
{
get => _btcPrice;
@@ -161,7 +149,7 @@ namespace WalletWasabi.Gui.ViewModels
private long _clientOutOfDate;
private long _backendIncompatible;
- public StatusBarViewModel(NodesCollection nodes, MemPoolService memPoolService, WasabiSynchronizer synchronizer, UpdateChecker updateChecker)
+ public StatusBarViewModel(NodesCollection nodes, WasabiSynchronizer synchronizer, UpdateChecker updateChecker)
{
_clientOutOfDate = 0;
_backendIncompatible = 0;
@@ -175,10 +163,6 @@ namespace WalletWasabi.Gui.ViewModels
BlocksLeft = 0;
WalletService.ConcurrentBlockDownloadNumberChanged += WalletService_ConcurrentBlockDownloadNumberChanged;
- MemPoolService = memPoolService;
- MemPoolService.TransactionReceived += MemPoolService_TransactionReceived;
- Mempool = MemPoolService.TransactionHashes.Count;
-
Synchronizer = synchronizer;
UpdateChecker = updateChecker;
Synchronizer.NewFilter += IndexDownloader_NewFilter;
@@ -332,11 +316,6 @@ namespace WalletWasabi.Gui.ViewModels
FiltersLeft = Synchronizer.GetFiltersLeft();
}
- private void MemPoolService_TransactionReceived(object sender, SmartTransaction e)
- {
- Mempool = MemPoolService.TransactionHashes.Count;
- }
-
private void Nodes_Removed(object sender, NodeEventArgs e)
{
Peers = Nodes.Count;
@@ -360,7 +339,6 @@ namespace WalletWasabi.Gui.ViewModels
{
Nodes.Added -= Nodes_Added;
Nodes.Removed -= Nodes_Removed;
- MemPoolService.TransactionReceived -= MemPoolService_TransactionReceived;
Synchronizer.NewFilter -= IndexDownloader_NewFilter;
Synchronizer.PropertyChanged -= Synchronizer_PropertyChanged;
Synchronizer.ResponseArrivedIsGenSocksServFail -= IndexDownloader_ResponseArrivedIsGenSocksServFail;

Remove Mempool from StatusBarViewModel.cs