Exemple #1
0
        public override IDebugModule Create()
        {
            IReadOnlyDbProvider        readOnlyDbProvider = new ReadOnlyDbProvider(_dbProvider, false);
            ReadOnlyBlockTree          readOnlyTree       = new ReadOnlyBlockTree(_blockTree);
            ReadOnlyTxProcessingEnv    txEnv = new ReadOnlyTxProcessingEnv(readOnlyDbProvider, readOnlyTree, _specProvider, _logManager);
            ReadOnlyChainProcessingEnv readOnlyChainProcessingEnv = new ReadOnlyChainProcessingEnv(txEnv, _blockValidator, _recoveryStep, _rewardCalculator, _receiptStorage, readOnlyDbProvider, _specProvider, _logManager);
            ITracer tracer = new Tracer(readOnlyChainProcessingEnv.Processor, _receiptStorage, new ReadOnlyBlockTree(_blockTree), _dbProvider.TraceDb);

            DebugBridge debugBridge = new DebugBridge(_configProvider, readOnlyDbProvider, tracer, readOnlyChainProcessingEnv.Processor, readOnlyTree);

            return(new DebugModule(_logManager, debugBridge));
        }
Exemple #2
0
        public override IDebugModule Create()
        {
            IReadOnlyDbProvider        readOnlyDbProvider = new ReadOnlyDbProvider(_dbProvider, false);
            ReadOnlyBlockTree          readOnlyTree       = new ReadOnlyBlockTree(_blockTree);
            ReadOnlyTxProcessingEnv    txEnv = new ReadOnlyTxProcessingEnv(readOnlyDbProvider, readOnlyTree, _specProvider, _logManager);
            ReadOnlyChainProcessingEnv readOnlyChainProcessingEnv = new ReadOnlyChainProcessingEnv(txEnv, _blockValidator, _recoveryStep, _rewardCalculatorSource.Get(txEnv.TransactionProcessor), _receiptStorage, readOnlyDbProvider, _specProvider, _logManager);

            TimeSpan          cancellationTokenTimeout = TimeSpan.FromMilliseconds(_jsonRpcConfig.TracerTimeout);
            CancellationToken cancellationToken        = new CancellationTokenSource(cancellationTokenTimeout).Token;

            IGethStyleTracer tracer = new GethStyleTracer(readOnlyChainProcessingEnv.ChainProcessor, _receiptStorage, new ReadOnlyBlockTree(_blockTree), cancellationToken);

            DebugBridge debugBridge = new DebugBridge(_configProvider, readOnlyDbProvider, tracer, readOnlyChainProcessingEnv.BlockProcessingQueue, readOnlyTree);

            return(new DebugModule(_logManager, debugBridge));
        }
Exemple #3
0
        public override IDebugModule Create()
        {
            IReadOnlyDbProvider readOnlyDbProvider = new ReadOnlyDbProvider(_dbProvider, false);
            ReadOnlyBlockTree   readOnlyTree       = new ReadOnlyBlockTree(_blockTree);

            ReadOnlyTxProcessingEnv txEnv =
                new ReadOnlyTxProcessingEnv(
                    readOnlyDbProvider,
                    readOnlyTree,
                    _specProvider,
                    _logManager);

            ReadOnlyChainProcessingEnv readOnlyChainProcessingEnv =
                new ReadOnlyChainProcessingEnv(
                    txEnv,
                    _blockValidator,
                    _recoveryStep,
                    _rewardCalculatorSource.Get(txEnv.TransactionProcessor),
                    _receiptStorage,
                    readOnlyDbProvider,
                    _specProvider,
                    _logManager);

            IGethStyleTracer tracer =
                new GethStyleTracer(
                    readOnlyChainProcessingEnv.ChainProcessor,
                    _receiptStorage,
                    new ReadOnlyBlockTree(_blockTree));

            DebugBridge debugBridge =
                new DebugBridge(
                    _configProvider,
                    readOnlyDbProvider,
                    tracer,
                    readOnlyTree,
                    _receiptStorage,
                    _receiptsMigration,
                    _specProvider);

            return(new DebugModule(_logManager, debugBridge, _jsonRpcConfig));
        }