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)}");
                }
            }
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
            }
        }