From e01ed207d89912cb8f9f4cdf904c152af0afef62 Mon Sep 17 00:00:00 2001 From: Francois de la Rouviere Date: Mon, 29 Nov 2021 10:56:29 +0000 Subject: [PATCH] Fix Build after merge --- .../Voting/JoinFederationRequestService.cs | 7 ++----- .../EventBus/InMemoryEventBus.cs | 20 ------------------- .../MaturedBlocksProviderTests.cs | 1 + 3 files changed, 3 insertions(+), 25 deletions(-) diff --git a/src/Stratis.Bitcoin.Features.PoA/Voting/JoinFederationRequestService.cs b/src/Stratis.Bitcoin.Features.PoA/Voting/JoinFederationRequestService.cs index b3b5ebb167..e17ae5bf58 100644 --- a/src/Stratis.Bitcoin.Features.PoA/Voting/JoinFederationRequestService.cs +++ b/src/Stratis.Bitcoin.Features.PoA/Voting/JoinFederationRequestService.cs @@ -3,7 +3,6 @@ using System.Net.Http; using System.Threading; using System.Threading.Tasks; -using Microsoft.Extensions.Logging; using NBitcoin; using Stratis.Bitcoin; using Stratis.Bitcoin.Configuration; @@ -31,19 +30,17 @@ public sealed class JoinFederationRequestService : IJoinFederationRequestService private readonly IFullNode fullNode; private readonly IHttpClientFactory httpClientFactory; private readonly IInitialBlockDownloadState initialBlockDownloadState; - private readonly ILoggerFactory loggerFactory; private readonly PoANetwork network; private readonly NodeSettings nodeSettings; private readonly VotingManager votingManager; - public JoinFederationRequestService(ICounterChainSettings counterChainSettings, IFederationManager federationManager, IFullNode fullNode, IInitialBlockDownloadState initialBlockDownloadState, IHttpClientFactory httpClientFactory, ILoggerFactory loggerFactory, Network network, NodeSettings nodeSettings, VotingManager votingManager) + public JoinFederationRequestService(ICounterChainSettings counterChainSettings, IFederationManager federationManager, IFullNode fullNode, IInitialBlockDownloadState initialBlockDownloadState, IHttpClientFactory httpClientFactory, Network network, NodeSettings nodeSettings, VotingManager votingManager) { this.counterChainSettings = counterChainSettings; this.federationManager = federationManager; this.fullNode = fullNode; this.initialBlockDownloadState = initialBlockDownloadState; this.httpClientFactory = httpClientFactory; - this.loggerFactory = loggerFactory; this.network = network as PoANetwork; this.nodeSettings = nodeSettings; this.votingManager = votingManager; @@ -91,7 +88,7 @@ public async Task JoinFederationAsync(JoinFederationRequestModel request ExternalAddress = request.CollateralAddress }; - var walletClient = new WalletClient(this.loggerFactory, this.httpClientFactory, $"http://{this.counterChainSettings.CounterChainApiHost}", this.counterChainSettings.CounterChainApiPort); + var walletClient = new WalletClient(this.httpClientFactory, $"http://{this.counterChainSettings.CounterChainApiHost}", this.counterChainSettings.CounterChainApiPort); try { diff --git a/src/Stratis.Bitcoin/EventBus/InMemoryEventBus.cs b/src/Stratis.Bitcoin/EventBus/InMemoryEventBus.cs index cbdbb6567e..e26aba30e2 100644 --- a/src/Stratis.Bitcoin/EventBus/InMemoryEventBus.cs +++ b/src/Stratis.Bitcoin/EventBus/InMemoryEventBus.cs @@ -66,26 +66,6 @@ public SubscriptionToken Subscribe(Type eventType, Func handler } } - /// - public SubscriptionToken Subscribe(Type eventType, Func handler) - { - if (handler == null) - throw new ArgumentNullException(nameof(handler)); - - lock (this.subscriptionsLock) - { - if (!this.subscriptions.ContainsKey(eventType)) - { - this.subscriptions.Add(eventType, new List()); - } - - var subscriptionToken = new SubscriptionToken(this, eventType); - this.subscriptions[eventType].Add(new Subscription(handler, subscriptionToken)); - - return subscriptionToken; - } - } - /// public SubscriptionToken Subscribe(Action handler) where TEvent : EventBase { diff --git a/src/Stratis.Features.FederatedPeg.Tests/MaturedBlocksProviderTests.cs b/src/Stratis.Features.FederatedPeg.Tests/MaturedBlocksProviderTests.cs index 1bf9e37efc..4a1081aaf6 100644 --- a/src/Stratis.Features.FederatedPeg.Tests/MaturedBlocksProviderTests.cs +++ b/src/Stratis.Features.FederatedPeg.Tests/MaturedBlocksProviderTests.cs @@ -14,6 +14,7 @@ using Stratis.Bitcoin.Primitives; using Stratis.Bitcoin.Tests.Common; using Stratis.Bitcoin.Utilities; +using Stratis.Features.FederatedPeg.Conversion; using Stratis.Features.FederatedPeg.Interfaces; using Stratis.Features.FederatedPeg.Models; using Stratis.Features.FederatedPeg.SourceChain;