Beispiel #1
0
        // TODO: remove from here - move to consensus?
        protected virtual BlockProcessor CreateBlockProcessor()
        {
            if (_api.DbProvider == null)
            {
                throw new StepDependencyException(nameof(_api.DbProvider));
            }
            if (_api.RewardCalculatorSource == null)
            {
                throw new StepDependencyException(nameof(_api.RewardCalculatorSource));
            }

            return(new BlockProcessor(
                       _api.SpecProvider,
                       _api.BlockValidator,
                       _api.RewardCalculatorSource.Get(_api.TransactionProcessor !),
                       new BlockProcessor.BlockValidationTransactionsExecutor(_api.TransactionProcessor, _api.StateProvider !),
                       _api.StateProvider,
                       _api.StorageProvider,
                       _api.ReceiptStorage,
                       _api.WitnessCollector,
                       _api.LogManager));
        }