Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Print("*Blockchain Parser* version 0.1.2.2");

            if (processPastBlocks(args))
            {
                Ethereum.StartListenNewBlocks((new_block) => {
                    Print("processing block " + new_block.hash);
                    var block_processor = new BlockProcessor();
                    block_processor.onTransactionsTo = processTransactionsTo;
                    block_processor.processBlock(new_block);
                });
                Print("Started service for " + AppConfig.WebsocketNodeUrl + " node listening...");
            }
            while (true)
            {
                Thread.Sleep(1000);
                if (args.Length > 0)
                {
                    break;
                }
            }

            Thread.Sleep(15000);
            Print("Service ended");
        }