public async Task With_steps_from_here_AuRa()
        {
            AuRaNethermindApi runnerContext = new AuRaNethermindApi(
                new ConfigProvider(),
                new EthereumJsonSerializer(),
                LimboLogs.Instance);

            IEthereumStepsLoader stepsLoader  = new EthereumStepsLoader(GetType().Assembly);
            EthereumStepsManager stepsManager = new EthereumStepsManager(
                stepsLoader,
                runnerContext,
                LimboLogs.Instance);

            using CancellationTokenSource source = new CancellationTokenSource(TimeSpan.FromSeconds(1));

            try
            {
                await stepsManager.InitializeAll(source.Token);
            }
            catch (Exception e)
            {
                if (!(e is OperationCanceledException))
                {
                    throw new AssertionFailedException($"Exception should be {nameof(OperationCanceledException)}");
                }
            }
        }
Пример #2
0
        public async Task When_no_assemblies_defined()
        {
            NethermindApi runnerContext = CreateApi <NethermindApi>();

            IEthereumStepsLoader stepsLoader  = new EthereumStepsLoader();
            EthereumStepsManager stepsManager = new EthereumStepsManager(
                stepsLoader,
                runnerContext,
                LimboLogs.Instance);

            using CancellationTokenSource source = new CancellationTokenSource(TimeSpan.FromSeconds(1));
            await stepsManager.InitializeAll(source.Token);
        }
Пример #3
0
        public async Task When_no_assemblies_defined()
        {
            EthereumRunnerContext runnerContext = new EthereumRunnerContext(
                new ConfigProvider(),
                LimboLogs.Instance);

            IEthereumStepsLoader stepsLoader  = new EthereumStepsLoader();
            EthereumStepsManager stepsManager = new EthereumStepsManager(
                stepsLoader,
                runnerContext,
                LimboLogs.Instance);

            CancellationTokenSource source = new CancellationTokenSource(TimeSpan.FromSeconds(1));
            await stepsManager.InitializeAll(source.Token);
        }
Пример #4
0
        public async Task Start(CancellationToken cancellationToken)
        {
            if (_logger.IsDebug)
            {
                _logger.Debug("Initializing Ethereum");
            }

            EthereumStepsLoader  stepsLoader  = new EthereumStepsLoader(GetType().Assembly);
            EthereumStepsManager stepsManager = new EthereumStepsManager(stepsLoader, _api, _api.LogManager);
            await stepsManager.InitializeAll(cancellationToken);

            string infoScreen = ThisNodeInfo.BuildNodeInfoScreen();

            if (_logger.IsInfo)
            {
                _logger.Info(infoScreen);
            }
        }
Пример #5
0
        public async Task Start(CancellationToken cancellationToken)
        {
            if (_logger.IsDebug)
            {
                _logger.Debug("Initializing Ethereum");
            }

            EthereumStepsManager stepsManager = new EthereumStepsManager(_context);
            await stepsManager.DiscoverAll(cancellationToken);

            await stepsManager.InitializeAll(cancellationToken);

            string infoScreen = ThisNodeInfo.BuildNodeInfoScreen();

            if (_logger.IsInfo)
            {
                _logger.Info(infoScreen);
            }
        }
Пример #6
0
        public async Task Start()
        {
            if (_logger.IsDebug)
            {
                _logger.Debug("Initializing Ethereum");
            }
            _context.RunnerCancellation = new CancellationTokenSource();
            _context.DisposeStack.Push(_context.RunnerCancellation);

            EthereumStepsManager stepsManager = new EthereumStepsManager(_context);

            stepsManager.DiscoverAll();
            await stepsManager.InitializeAll();

            string infoScreen = ThisNodeInfo.BuildNodeInfoScreen();

            if (_logger.IsInfo)
            {
                _logger.Info(infoScreen);
            }
        }