public ReadOnlyChainProcessingEnv(
            ReadOnlyTxProcessingEnv txEnv,
            IBlockValidator blockValidator,
            IBlockPreprocessorStep recoveryStep,
            IRewardCalculator rewardCalculator,
            IReceiptStorage receiptStorage,
            IReadOnlyDbProvider dbProvider,
            ISpecProvider specProvider,
            ILogManager logManager)
        {
            _txEnv = txEnv;

            BlockProcessor = new BlockProcessor(
                specProvider,
                blockValidator,
                rewardCalculator,
                _txEnv.TransactionProcessor,
                StateProvider,
                _txEnv.StorageProvider,
                NullTxPool.Instance,
                receiptStorage,
                NullWitnessCollector.Instance,
                logManager);

            _blockProcessingQueue = new BlockchainProcessor(_txEnv.BlockTree, BlockProcessor, recoveryStep, logManager, BlockchainProcessor.Options.NoReceipts);
            BlockProcessingQueue  = _blockProcessingQueue;
            ChainProcessor        = new OneTimeChainProcessor(dbProvider, _blockProcessingQueue);
        }
 public BlockProductionTransactionsExecutor(
     ReadOnlyTxProcessingEnv readOnlyTxProcessingEnv,
     ISpecProvider specProvider,
     ILogManager logManager)
     : this(
         readOnlyTxProcessingEnv.TransactionProcessor,
         readOnlyTxProcessingEnv.StateProvider,
         readOnlyTxProcessingEnv.StorageProvider,
         specProvider,
         logManager)
 {
 }
Example #3
0
 public ReadOnlyTransactionProcessorSource(ReadOnlyTxProcessingEnv environment)
 {
     _environment = environment;
 }
Example #4
0
 public ReadOnlyTransactionProcessorSource(IDbProvider dbProvider, IBlockTree blockTree, ISpecProvider specProvider, ILogManager logManager)
 {
     _environment = new ReadOnlyTxProcessingEnv(new ReadOnlyDbProvider(dbProvider, false), new ReadOnlyBlockTree(blockTree), specProvider, logManager);
 }