public CheckCollateralFullValidationRule(IInitialBlockDownloadState ibdState, ICollateralChecker collateralChecker, ISlotsManager slotsManager, IDateTimeProvider dateTime) { this.ibdState = ibdState; this.collateralChecker = collateralChecker; this.slotsManager = slotsManager; this.dateTime = dateTime; }
public TestPoAMiner( IConsensusManager consensusManager, IDateTimeProvider dateTimeProvider, Network network, INodeLifetime nodeLifetime, ILoggerFactory loggerFactory, IInitialBlockDownloadState ibdState, BlockDefinition blockDefinition, ISlotsManager slotsManager, IConnectionManager connectionManager, PoABlockHeaderValidator poaHeaderValidator, IFederationManager federationManager, IIntegrityValidator integrityValidator, IWalletManager walletManager, INodeStats nodeStats, VotingManager votingManager, PoAMinerSettings poAMinerSettings, IAsyncProvider asyncProvider) : base(consensusManager, dateTimeProvider, network, nodeLifetime, loggerFactory, ibdState, blockDefinition, slotsManager, connectionManager, poaHeaderValidator, federationManager, integrityValidator, walletManager, nodeStats, votingManager, poAMinerSettings, asyncProvider) { this.timeProvider = dateTimeProvider as EditableTimeProvider; this.cancellation = new CancellationTokenSource(); this.slotsManager = slotsManager; this.consensusManager = consensusManager; }
public void GetMiningTimestamp() { var tool = new KeyTool(new DataFolder(string.Empty)); Key key = tool.GeneratePrivateKey(); this.network = new TestPoANetwork(new List <PubKey>() { tool.GeneratePrivateKey().PubKey, key.PubKey, tool.GeneratePrivateKey().PubKey }); IFederationManager fedManager = PoATestsBase.CreateFederationManager(this, this.network, new ExtendedLoggerFactory(), new Signals.Signals(new LoggerFactory(), null)); this.slotsManager = new SlotsManager(this.network, fedManager, new LoggerFactory()); List <IFederationMember> federationMembers = this.federationManager.GetFederationMembers(); uint roundStart = this.consensusOptions.TargetSpacingSeconds * (uint)federationMembers.Count * 5; fedManager.SetPrivatePropertyValue(typeof(FederationManagerBase), nameof(IFederationManager.CurrentFederationKey), key); fedManager.SetPrivatePropertyValue(typeof(FederationManagerBase), nameof(this.federationManager.IsFederationMember), true); Assert.Equal(roundStart + this.consensusOptions.TargetSpacingSeconds, this.slotsManager.GetMiningTimestamp(roundStart)); Assert.Equal(roundStart + this.consensusOptions.TargetSpacingSeconds, this.slotsManager.GetMiningTimestamp(roundStart + 4)); roundStart += this.consensusOptions.TargetSpacingSeconds * (uint)federationMembers.Count; Assert.Equal(roundStart + this.consensusOptions.TargetSpacingSeconds, this.slotsManager.GetMiningTimestamp(roundStart - 5)); Assert.Equal(roundStart + this.consensusOptions.TargetSpacingSeconds, this.slotsManager.GetMiningTimestamp(roundStart - this.consensusOptions.TargetSpacingSeconds + 1)); Assert.True(this.slotsManager.IsValidTimestamp(this.slotsManager.GetMiningTimestamp(roundStart - 5))); }
public SlotsManagerTests() { this.network = new TestPoANetwork(); this.consensusOptions = this.network.ConsensusOptions; this.federationManager = PoATestsBase.CreateFederationManager(this); this.slotsManager = new SlotsManager(this.network, this.federationManager, new LoggerFactory()); }
public SlotsManagerTests() { this.network = new TestPoANetwork(); this.consensusOptions = this.network.ConsensusOptions; (this.federationManager, this.federationHistory) = PoATestsBase.CreateFederationManager(this); this.chainIndexer = new Mock <ChainIndexer>(); this.slotsManager = new SlotsManager(this.network, this.federationManager, this.federationHistory, this.chainIndexer.Object); }
public void GetMiningTimestamp() { var tool = new KeyTool(new DataFolder(string.Empty)); Key key = tool.GeneratePrivateKey(); this.network = new TestPoANetwork(new List <PubKey>() { tool.GeneratePrivateKey().PubKey, key.PubKey, tool.GeneratePrivateKey().PubKey }); (IFederationManager fedManager, IFederationHistory federationHistory) = PoATestsBase.CreateFederationManager(this, this.network, new ExtendedLoggerFactory(), new Signals.Signals(new LoggerFactory(), null)); var header = new BlockHeader(); this.chainIndexer.Setup(x => x.Tip).Returns(new ChainedHeader(header, header.GetHash(), 0)); this.slotsManager = new SlotsManager(this.network, fedManager, federationHistory, this.chainIndexer.Object); List <IFederationMember> federationMembers = fedManager.GetFederationMembers(); uint roundStart = this.consensusOptions.TargetSpacingSeconds * (uint)federationMembers.Count * 5; fedManager.SetPrivatePropertyValue(typeof(FederationManager), nameof(IFederationManager.CurrentFederationKey), key); fedManager.SetPrivatePropertyValue(typeof(FederationManager), nameof(this.federationManager.IsFederationMember), true); Assert.Equal(roundStart + this.consensusOptions.TargetSpacingSeconds, this.slotsManager.GetMiningTimestamp(roundStart)); Assert.Equal(roundStart + this.consensusOptions.TargetSpacingSeconds, this.slotsManager.GetMiningTimestamp(roundStart + 4)); roundStart += this.consensusOptions.TargetSpacingSeconds * (uint)federationMembers.Count; Assert.Equal(roundStart + this.consensusOptions.TargetSpacingSeconds, this.slotsManager.GetMiningTimestamp(roundStart - 5)); Assert.Equal(roundStart + this.consensusOptions.TargetSpacingSeconds, this.slotsManager.GetMiningTimestamp(roundStart - this.consensusOptions.TargetSpacingSeconds + 1)); Assert.True(this.slotsManager.IsValidTimestamp(this.slotsManager.GetMiningTimestamp(roundStart - 5))); uint thisTurnTimestamp = roundStart + this.consensusOptions.TargetSpacingSeconds; uint nextTurnTimestamp = thisTurnTimestamp + this.consensusOptions.TargetSpacingSeconds * (uint)federationMembers.Count; // If we are past our last timestamp's turn, always give us the NEXT timestamp. uint justPastOurTurnTime = thisTurnTimestamp + (this.consensusOptions.TargetSpacingSeconds / 2) + 1; Assert.Equal(nextTurnTimestamp, this.slotsManager.GetMiningTimestamp(justPastOurTurnTime)); // If we are only just past our last timestamp, but still in the "range" and we haven't mined a block yet, get THIS turn's timestamp. Assert.Equal(thisTurnTimestamp, this.slotsManager.GetMiningTimestamp(thisTurnTimestamp + 1)); // If we are only just past our last timestamp, but we've already mined a block there, then get the NEXT turn's timestamp. header = new BlockHeader { Time = thisTurnTimestamp }; Mock.Get(federationHistory).Setup(x => x.GetFederationMemberForBlock(It.IsAny <ChainedHeader>())).Returns <ChainedHeader>((chainedHeader) => { return(federationMembers[1]); }); this.chainIndexer.Setup(x => x.Tip).Returns(new ChainedHeader(header, header.GetHash(), 0)); this.slotsManager = new SlotsManager(this.network, fedManager, federationHistory, this.chainIndexer.Object); Assert.Equal(nextTurnTimestamp, this.slotsManager.GetMiningTimestamp(thisTurnTimestamp + 1)); }
public SlotsManagerTests() { this.network = new TestPoANetwork(); this.consensusOptions = this.network.ConsensusOptions; this.federationManager = PoATestsBase.CreateFederationManager(this).federationManager; this.chainIndexer = new Mock <ChainIndexer>(); this.slotsManager = new SlotsManager(this.network, this.federationManager, this.chainIndexer.Object, new LoggerFactory()); }
public SmartContractCollateralPoARuleRegistration(Network network, IStateRepositoryRoot stateRepositoryRoot, IContractExecutorFactory executorFactory, ICallDataSerializer callDataSerializer, ISenderRetriever senderRetriever, IReceiptRepository receiptRepository, ICoinView coinView, IEnumerable <IContractTransactionPartialValidationRule> partialTxValidationRules, IEnumerable <IContractTransactionFullValidationRule> fullTxValidationRules, IInitialBlockDownloadState ibdState, ISlotsManager slotsManager, ICollateralChecker collateralChecker) : base(network, stateRepositoryRoot, executorFactory, callDataSerializer, senderRetriever, receiptRepository, coinView, partialTxValidationRules, fullTxValidationRules) { this.ibdState = ibdState; this.slotsManager = slotsManager; this.collateralChecker = collateralChecker; }
public override void Initialize() { this.votingDataEncoder = new VotingDataEncoder(this.Parent.LoggerFactory); this.ruleEngine = (PoAConsensusRuleEngine)this.Parent; this.federationManager = this.ruleEngine.FederationManager; this.votingManager = this.ruleEngine.VotingManager; this.slotsManager = this.ruleEngine.SlotsManager; base.Initialize(); }
public CheckCollateralFullValidationRule(IInitialBlockDownloadState ibdState, ICollateralChecker collateralChecker, ISlotsManager slotsManager, IDateTimeProvider dateTime, Network network) { this.network = network; this.ibdState = ibdState; this.collateralChecker = collateralChecker; this.slotsManager = slotsManager; this.dateTime = dateTime; this.collateralCheckBanDurationSeconds = (int)(this.network.Consensus.Options as PoAConsensusOptions).TargetSpacingSeconds / 2; }
public CheckCollateralFullValidationRule(IInitialBlockDownloadState ibdState, ICollateralChecker collateralChecker, ISlotsManager slotsManager, IDateTimeProvider dateTime, Network network, CounterChainNetworkWrapper counterChainNetwork) { this.counterChainNetwork = counterChainNetwork.CounterChainNetwork; this.encoder = new CollateralHeightCommitmentEncoder(); this.ibdState = ibdState; this.collateralChecker = collateralChecker; this.slotsManager = slotsManager; this.dateTime = dateTime; this.collateralCheckBanDurationSeconds = (int)(network.Consensus.Options as PoAConsensusOptions).TargetSpacingSeconds / 2; }
public override void Initialize() { this.votingDataEncoder = new VotingDataEncoder(this.Parent.LoggerFactory); this.ruleEngine = (PoAConsensusRuleEngine)this.Parent; this.loggerFactory = this.Parent.LoggerFactory; this.logger = this.loggerFactory.CreateLogger(this.GetType().FullName); this.network = this.Parent.Network; this.federationManager = this.ruleEngine.FederationManager; this.slotsManager = this.ruleEngine.SlotsManager; this.consensusFactory = (CollateralPoAConsensusFactory)this.network.Consensus.ConsensusFactory; base.Initialize(); }
public IdleFederationMembersKicker(ISignals signals, Network network, IKeyValueRepository keyValueRepository, IConsensusManager consensusManager, IFederationManager federationManager, ISlotsManager slotsManager, VotingManager votingManager, ILoggerFactory loggerFactory) { this.signals = signals; this.network = network; this.keyValueRepository = keyValueRepository; this.consensusManager = consensusManager; this.federationManager = federationManager; this.slotsManager = slotsManager; this.votingManager = votingManager; this.logger = loggerFactory.CreateLogger(this.GetType().FullName); this.federationMemberMaxIdleTimeSeconds = ((PoAConsensusOptions)network.Consensus.Options).FederationMemberMaxIdleTimeSeconds; }
public PoAMiner( IConsensusManager consensusManager, IDateTimeProvider dateTimeProvider, Network network, INodeLifetime nodeLifetime, ILoggerFactory loggerFactory, IInitialBlockDownloadState ibdState, BlockDefinition blockDefinition, ISlotsManager slotsManager, IConnectionManager connectionManager, PoABlockHeaderValidator poaHeaderValidator, IFederationManager federationManager, IFederationHistory federationHistory, IIntegrityValidator integrityValidator, IWalletManager walletManager, INodeStats nodeStats, VotingManager votingManager, PoASettings poAMinerSettings, IAsyncProvider asyncProvider, IIdleFederationMembersKicker idleFederationMembersKicker, NodeSettings nodeSettings) { this.consensusManager = consensusManager; this.dateTimeProvider = dateTimeProvider; this.network = network as PoANetwork; this.ibdState = ibdState; this.blockDefinition = blockDefinition; this.slotsManager = slotsManager; this.connectionManager = connectionManager; this.poaHeaderValidator = poaHeaderValidator; this.federationManager = federationManager; this.federationHistory = federationHistory; this.integrityValidator = integrityValidator; this.walletManager = walletManager; this.votingManager = votingManager; this.poaSettings = poAMinerSettings; this.asyncProvider = asyncProvider; this.idleFederationMembersKicker = idleFederationMembersKicker; this.nodeLifetime = nodeLifetime; this.logger = loggerFactory.CreateLogger(this.GetType().FullName); this.cancellation = CancellationTokenSource.CreateLinkedTokenSource(new[] { nodeLifetime.ApplicationStopping }); this.votingDataEncoder = new VotingDataEncoder(); this.nodeSettings = nodeSettings; this.miningStatistics = new MiningStatisticsModel(); nodeStats.RegisterStats(this.AddComponentStats, StatsType.Component, this.GetType().Name); }
/// <inheritdoc /> public override void Initialize() { base.Initialize(); var engine = this.Parent as PoAConsensusRuleEngine; // TODO: Consider adding these via a constructor on this rule. this.slotsManager = engine.SlotsManager; this.federationHistory = engine.FederationHistory; this.validator = engine.PoaHeaderValidator; this.chainState = engine.ChainState; this.network = this.Parent.Network; this.maxReorg = this.network.Consensus.MaxReorgLength; }
/// <inheritdoc /> public override void Initialize() { base.Initialize(); var engine = this.Parent as PoAConsensusRuleEngine; // TODO: Consider adding these via a constructor on this rule. this.slotsManager = engine.SlotsManager; this.federationHistory = engine.FederationHistory; this.validator = engine.PoaHeaderValidator; var lastCheckPoint = engine.Network.Checkpoints.LastOrDefault(); this.lastCheckPoint = (lastCheckPoint.Value != null) ? new HashHeightPair(lastCheckPoint.Value.Hash, lastCheckPoint.Key) : null; }
/// <inheritdoc /> public override void Initialize() { base.Initialize(); var engine = this.Parent as PoAConsensusRuleEngine; this.slotsManager = engine.SlotsManager; this.validator = engine.PoaHeaderValidator; this.votingManager = engine.VotingManager; this.chainState = engine.ChainState; this.network = this.Parent.Network; this.maxReorg = this.network.Consensus.MaxReorgLength; this.votingEnabled = ((PoAConsensusOptions)this.network.Consensus.Options).VotingEnabled; }
public IdleFederationMembersKicker(ISignals signals, Network network, IKeyValueRepository keyValueRepository, IConsensusManager consensusManager, IFederationManager federationManager, ISlotsManager slotsManager, VotingManager votingManager, ILoggerFactory loggerFactory, IDateTimeProvider timeProvider) { this.signals = signals; this.network = network; this.keyValueRepository = keyValueRepository; this.consensusManager = consensusManager; this.federationManager = federationManager; this.slotsManager = slotsManager; this.votingManager = votingManager; this.timeProvider = timeProvider; this.consensusFactory = this.network.Consensus.ConsensusFactory as PoAConsensusFactory; this.logger = loggerFactory.CreateLogger("Impleum.Bitcoin.Fullnode"); this.federationMemberMaxIdleTimeSeconds = ((PoAConsensusOptions)network.Consensus.Options).FederationMemberMaxIdleTimeSeconds; }
public PoATestsBase(TestPoANetwork network = null) { this.loggerFactory = new LoggerFactory(); this.signals = new Signals.Signals(this.loggerFactory, null); this.network = network == null ? new TestPoANetwork() : network; this.consensusOptions = this.network.ConsensusOptions; this.dBreezeSerializer = new DBreezeSerializer(this.network.Consensus.ConsensusFactory); this.ChainIndexer = new ChainIndexer(this.network); IDateTimeProvider timeProvider = new DateTimeProvider(); this.consensusSettings = new ConsensusSettings(NodeSettings.Default(this.network)); this.federationManager = CreateFederationManager(this, this.network, this.loggerFactory, this.signals); this.chainIndexerMock = new Mock <ChainIndexer>(); var header = new BlockHeader(); this.chainIndexerMock.Setup(x => x.Tip).Returns(new ChainedHeader(header, header.GetHash(), 0)); this.slotsManager = new SlotsManager(this.network, this.federationManager, this.chainIndexerMock.Object, this.loggerFactory); this.poaHeaderValidator = new PoABlockHeaderValidator(this.loggerFactory); this.asyncProvider = new AsyncProvider(this.loggerFactory, this.signals, new Mock <INodeLifetime>().Object); var dataFolder = new DataFolder(TestBase.CreateTestDir(this)); var finalizedBlockRepo = new FinalizedBlockInfoRepository(new KeyValueRepository(dataFolder, this.dBreezeSerializer), this.loggerFactory, this.asyncProvider); finalizedBlockRepo.LoadFinalizedBlockInfoAsync(this.network).GetAwaiter().GetResult(); this.resultExecutorMock = new Mock <IPollResultExecutor>(); this.votingManager = new VotingManager(this.federationManager, this.loggerFactory, this.slotsManager, this.resultExecutorMock.Object, new NodeStats(timeProvider, this.loggerFactory), dataFolder, this.dBreezeSerializer, this.signals, finalizedBlockRepo, this.network); this.votingManager.Initialize(); this.chainState = new ChainState(); this.rulesEngine = new PoAConsensusRuleEngine(this.network, this.loggerFactory, new DateTimeProvider(), this.ChainIndexer, new NodeDeployments(this.network, this.ChainIndexer), this.consensusSettings, new Checkpoints(this.network, this.consensusSettings), new Mock <ICoinView>().Object, this.chainState, new InvalidBlockHashStore(timeProvider), new NodeStats(timeProvider, this.loggerFactory), this.slotsManager, this.poaHeaderValidator, this.votingManager, this.federationManager, this.asyncProvider, new ConsensusRulesContainer()); List <ChainedHeader> headers = ChainedHeadersHelper.CreateConsecutiveHeaders(50, null, false, null, this.network); this.currentHeader = headers.Last(); }
public VotingManager(IFederationManager federationManager, ILoggerFactory loggerFactory, ISlotsManager slotsManager, IPollResultExecutor pollResultExecutor, INodeStats nodeStats, DataFolder dataFolder, DBreezeSerializer dBreezeSerializer, ISignals signals, IFinalizedBlockInfoRepository finalizedBlockInfo) { this.federationManager = Guard.NotNull(federationManager, nameof(federationManager)); this.slotsManager = Guard.NotNull(slotsManager, nameof(slotsManager)); this.pollResultExecutor = Guard.NotNull(pollResultExecutor, nameof(pollResultExecutor)); this.signals = Guard.NotNull(signals, nameof(signals)); this.nodeStats = Guard.NotNull(nodeStats, nameof(nodeStats)); this.finalizedBlockInfo = Guard.NotNull(finalizedBlockInfo, nameof(finalizedBlockInfo)); this.locker = new object(); this.votingDataEncoder = new VotingDataEncoder(loggerFactory); this.scheduledVotingData = new List <VotingData>(); this.pollsRepository = new PollsRepository(dataFolder, loggerFactory, dBreezeSerializer); this.logger = loggerFactory.CreateLogger("Impleum.Bitcoin.Fullnode"); this.isInitialized = false; }
public PoAMiner( IConsensusManager consensusManager, IDateTimeProvider dateTimeProvider, Network network, INodeLifetime nodeLifetime, ILoggerFactory loggerFactory, IInitialBlockDownloadState ibdState, BlockDefinition blockDefinition, ISlotsManager slotsManager, IConnectionManager connectionManager, PoABlockHeaderValidator poaHeaderValidator, IFederationManager federationManager, IIntegrityValidator integrityValidator, IWalletManager walletManager, INodeStats nodeStats, VotingManager votingManager, PoAMinerSettings poAMinerSettings, IAsyncProvider asyncProvider) { this.consensusManager = consensusManager; this.dateTimeProvider = dateTimeProvider; this.network = network as PoANetwork; this.ibdState = ibdState; this.blockDefinition = blockDefinition; this.slotsManager = slotsManager; this.connectionManager = connectionManager; this.poaHeaderValidator = poaHeaderValidator; this.federationManager = federationManager; this.integrityValidator = integrityValidator; this.walletManager = walletManager; this.votingManager = votingManager; this.settings = poAMinerSettings; this.asyncProvider = asyncProvider; this.logger = loggerFactory.CreateLogger("Impleum.Bitcoin.Fullnode"); this.cancellation = CancellationTokenSource.CreateLinkedTokenSource(new[] { nodeLifetime.ApplicationStopping }); this.votingDataEncoder = new VotingDataEncoder(loggerFactory); nodeStats.RegisterStats(this.AddComponentStats, StatsType.Component); }
public PoATestsBase(TestPoANetwork network = null) { this.loggerFactory = new LoggerFactory(); this.signals = new Signals.Signals(this.loggerFactory, null); this.network = network ?? new TestPoANetwork(); this.consensusOptions = this.network.ConsensusOptions; this.dBreezeSerializer = new DBreezeSerializer(this.network.Consensus.ConsensusFactory); this.ChainIndexer = new ChainIndexer(this.network); IDateTimeProvider dateTimeProvider = new DateTimeProvider(); this.consensusSettings = new ConsensusSettings(NodeSettings.Default(this.network)); (this.federationManager, this.federationHistory) = CreateFederationManager(this, this.network, this.loggerFactory, this.signals); this.slotsManager = new SlotsManager(this.network, this.federationManager, this.federationHistory, this.ChainIndexer); this.poaHeaderValidator = new PoABlockHeaderValidator(this.loggerFactory); this.asyncProvider = new AsyncProvider(this.loggerFactory, this.signals); var dataFolder = new DataFolder(TestBase.CreateTestDir(this)); this.resultExecutorMock = new Mock <IPollResultExecutor>(); this.votingManager = new VotingManager(this.federationManager, this.resultExecutorMock.Object, new NodeStats(dateTimeProvider, NodeSettings.Default(this.network), new Mock <IVersionProvider>().Object), dataFolder, this.dBreezeSerializer, this.signals, this.network, this.ChainIndexer, null); this.votingManager.Initialize(this.federationHistory); this.chainState = new ChainState(); this.rulesEngine = new PoAConsensusRuleEngine(this.network, this.loggerFactory, new DateTimeProvider(), this.ChainIndexer, new NodeDeployments(this.network, this.ChainIndexer), this.consensusSettings, new Checkpoints(this.network, this.consensusSettings), new Mock <ICoinView>().Object, this.chainState, new InvalidBlockHashStore(dateTimeProvider), new NodeStats(dateTimeProvider, NodeSettings.Default(this.network), new Mock <IVersionProvider>().Object), this.slotsManager, this.poaHeaderValidator, this.votingManager, this.federationManager, this.asyncProvider, new ConsensusRulesContainer(), this.federationHistory); List <ChainedHeader> headers = ChainedHeadersHelper.CreateConsecutiveHeaders(50, null, false, null, this.network); this.currentHeader = headers.Last(); }
public CollateralPoAMiner(IConsensusManager consensusManager, IDateTimeProvider dateTimeProvider, Network network, INodeLifetime nodeLifetime, ILoggerFactory loggerFactory, IInitialBlockDownloadState ibdState, BlockDefinition blockDefinition, ISlotsManager slotsManager, IConnectionManager connectionManager, PoABlockHeaderValidator poaHeaderValidator, IFederationManager federationManager, IIntegrityValidator integrityValidator, IWalletManager walletManager, INodeStats nodeStats, VotingManager votingManager, PoAMinerSettings poAMinerSettings, ICollateralChecker collateralChecker, IAsyncProvider asyncProvider) : base(consensusManager, dateTimeProvider, network, nodeLifetime, loggerFactory, ibdState, blockDefinition, slotsManager, connectionManager, poaHeaderValidator, federationManager, integrityValidator, walletManager, nodeStats, votingManager, poAMinerSettings, asyncProvider) { this.collateralChecker = collateralChecker; this.encoder = new CollateralHeightCommitmentEncoder(); }
/// <inheritdoc /> public override void Initialize() { base.Initialize(); this.slotsManager = (this.Parent as PoAConsensusRuleEngine).SlotsManager; }
public CollateralPoAMiner(IConsensusManager consensusManager, IDateTimeProvider dateTimeProvider, Network network, INodeLifetime nodeLifetime, ILoggerFactory loggerFactory, IInitialBlockDownloadState ibdState, BlockDefinition blockDefinition, ISlotsManager slotsManager, IConnectionManager connectionManager, JoinFederationRequestMonitor joinFederationRequestMonitor, PoABlockHeaderValidator poaHeaderValidator, IFederationManager federationManager, IIntegrityValidator integrityValidator, IWalletManager walletManager, ChainIndexer chainIndexer, INodeStats nodeStats, VotingManager votingManager, PoAMinerSettings poAMinerSettings, ICollateralChecker collateralChecker, IAsyncProvider asyncProvider, ICounterChainSettings counterChainSettings, IIdleFederationMembersKicker idleFederationMembersKicker) : base(consensusManager, dateTimeProvider, network, nodeLifetime, loggerFactory, ibdState, blockDefinition, slotsManager, connectionManager, poaHeaderValidator, federationManager, integrityValidator, walletManager, nodeStats, votingManager, poAMinerSettings, asyncProvider, idleFederationMembersKicker) { this.counterChainNetwork = counterChainSettings.CounterChainNetwork; this.collateralChecker = collateralChecker; this.encoder = new CollateralHeightCommitmentEncoder(this.logger); this.chainIndexer = chainIndexer; this.joinFederationRequestMonitor = joinFederationRequestMonitor; }
public PoAConsensusRuleEngine(Network network, ILoggerFactory loggerFactory, IDateTimeProvider dateTimeProvider, ChainIndexer chainIndexer, NodeDeployments nodeDeployments, ConsensusSettings consensusSettings, ICheckpoints checkpoints, ICoinView utxoSet, IChainState chainState, IInvalidBlockHashStore invalidBlockHashStore, INodeStats nodeStats, ISlotsManager slotsManager, PoABlockHeaderValidator poaHeaderValidator, VotingManager votingManager, IFederationManager federationManager, IAsyncProvider asyncProvider, ConsensusRulesContainer consensusRulesContainer) : base(network, loggerFactory, dateTimeProvider, chainIndexer, nodeDeployments, consensusSettings, checkpoints, utxoSet, chainState, invalidBlockHashStore, nodeStats, asyncProvider, consensusRulesContainer) { this.SlotsManager = slotsManager; this.PoaHeaderValidator = poaHeaderValidator; this.VotingManager = votingManager; this.FederationManager = federationManager; }