static void Main(string[] args) { //string url = "./geth.ipc"; //int start = 500599; //int end = 1000000; //bool postVm = true; string url = args[0]; int start = Convert.ToInt32(args[1]); int end = Convert.ToInt32(args[2]); bool postVm = false; if (args.Length > 3) { if (args[3].ToLower() == "postvm") { postVm = true; } } string prefix = "Morden"; string connectionString = "DefaultEndpointsProtocol=https;AccountName=ujostorage;AccountKey=DPGFO3b/lkkMLCD6jy495ZZzUSkgcCaPS1/ue1HnpS9ewuOgtHErurN8bhSm960cYD0oWRTXW/86njdNkvS2ZQ=="; var proc = new StorageProcessor(url, start, end, connectionString, prefix, postVm); // proc.Init().Wait(); var result = proc.ExecuteAsync().Result; Debug.WriteLine(result); System.Console.WriteLine(result); System.Console.ReadLine(); }
static void Main(string[] args) { ServiceCollection serviceCollection = new ServiceCollection(); ConfigureServices(serviceCollection); IServiceProvider serviceProvider = serviceCollection.BuildServiceProvider(); var url = "http://localhost:8545"; var processor = new StorageProcessor(url, unitOfWork); while (true) { new Helpers().AddLog(LogType.Info, "Processing Blockchain"); var result = processor.ExecuteAsync(); Task.WaitAll(result); } }