public StartAsync ( ) : System.Threading.Tasks.Task | ||
Résultat | System.Threading.Tasks.Task |
public async Task StartAsync()
{
await Task.WhenAll(
// start the blockchain daemon
Task.Run(() => CoreDaemon.Start()),
// start p2p client
Task.Run(() => LocalClient.Start(nodeConfig.ConnectToPeers)));
}
}
public static void Main(string[] args) { try { using (var bitSharpNode = new BitSharpNode(args, strictArgs: true)) { bitSharpNode.StartAsync().Forget(); Console.WriteLine("Press enter to exit node."); Console.ReadLine(); Console.WriteLine("Shutting down."); } } catch (Exception ex) { Console.WriteLine(ex.ToString()); Environment.Exit(-1); } }