Exemple #1
0
        protected BlockDefinition(
            IConsensusManager consensusManager,
            IDateTimeProvider dateTimeProvider,
            ILoggerFactory loggerFactory,
            ITxMempool mempool,
            MempoolSchedulerLock mempoolLock,
            MinerSettings minerSettings,
            Network network,
            NodeDeployments nodeDeployments)
        {
            this.ConsensusManager = consensusManager;
            this.DateTimeProvider = dateTimeProvider;
            this.logger           = loggerFactory.CreateLogger(GetType().FullName);
            this.Mempool          = mempool;
            this.MempoolLock      = mempoolLock;
            this.Network          = network;
            this.nodeDeployments  = nodeDeployments;

            this.Options         = minerSettings.BlockDefinitionOptions;
            this.BlockMinFeeRate = this.Options.BlockMinFeeRate;

            // Whether we need to account for byte usage (in addition to weight usage).
            this.NeedSizeAccounting = this.Options.BlockMaxSize < network.Consensus.Options.MaxBlockSerializedSize;

            Configure();
        }
 public PowBlockDefinition(
     IConsensusManager consensusManager,
     IDateTimeProvider dateTimeProvider,
     ILoggerFactory loggerFactory,
     ITxMempool mempool,
     MempoolSchedulerLock mempoolLock,
     MinerSettings minerSettings,
     Network network,
     IConsensusRuleEngine consensusRules,
     NodeDeployments nodeDeployments,
     BlockDefinitionOptions options = null)
     : base(consensusManager, dateTimeProvider, loggerFactory, mempool, mempoolLock, minerSettings, network,
            nodeDeployments)
 {
     this.consensusRules = consensusRules;
     this.logger         = loggerFactory.CreateLogger(GetType().FullName);
 }