Пример #1
0
        public PoAMiner(
            IConsensusManager consensusManager,
            IDateTimeProvider dateTimeProvider,
            Network network,
            INodeLifetime nodeLifetime,
            ILoggerFactory loggerFactory,
            IInitialBlockDownloadState ibdState,
            BlockDefinition blockDefinition,
            SlotsManager slotsManager,
            IConnectionManager connectionManager,
            PoABlockHeaderValidator poaHeaderValidator,
            FederationManager federationManager,
            IIntegrityValidator integrityValidator,
            IWalletManager walletManager,
            INodeStats nodeStats)
        {
            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.logger       = loggerFactory.CreateLogger(this.GetType().FullName);
            this.cancellation = CancellationTokenSource.CreateLinkedTokenSource(new[] { nodeLifetime.ApplicationStopping });

            nodeStats.RegisterStats(this.AddComponentStats, StatsType.Component);
        }
 public PoAConsensusRuleEngine(Network network, ILoggerFactory loggerFactory, IDateTimeProvider dateTimeProvider, ConcurrentChain chain,
                               NodeDeployments nodeDeployments, ConsensusSettings consensusSettings, ICheckpoints checkpoints, ICoinView utxoSet, IChainState chainState,
                               IInvalidBlockHashStore invalidBlockHashStore, INodeStats nodeStats, SlotsManager slotsManager, PoABlockHeaderValidator poaHeaderValidator)
     : base(network, loggerFactory, dateTimeProvider, chain, nodeDeployments, consensusSettings, checkpoints, utxoSet, chainState, invalidBlockHashStore, nodeStats)
 {
     this.SlotsManager       = slotsManager;
     this.poaHeaderValidator = poaHeaderValidator;
 }
Пример #3
0
        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);
        }
Пример #4
0
        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);
        }
Пример #5
0
 public PoAConsensusRuleEngine(Network network, ILoggerFactory loggerFactory, IDateTimeProvider dateTimeProvider, ChainIndexer chainIndexer,
                               NodeDeployments nodeDeployments, ConsensusSettings consensusSettings, ICheckpoints checkpoints, ICoinView utxoSet, IChainState chainState,
                               IInvalidBlockHashStore invalidBlockHashStore, INodeStats nodeStats, SlotsManager slotsManager, PoABlockHeaderValidator poaHeaderValidator,
                               VotingManager votingManager, FederationManager federationManager)
     : base(network, loggerFactory, dateTimeProvider, chainIndexer, nodeDeployments, consensusSettings, checkpoints, utxoSet, chainState, invalidBlockHashStore, nodeStats)
 {
     this.SlotsManager       = slotsManager;
     this.PoaHeaderValidator = poaHeaderValidator;
     this.VotingManager      = votingManager;
     this.FederationManager  = federationManager;
 }