/// <summary> /// Stops this node and waits for all associated threads to exit /// </summary> public void Stop() { // Stop API server Logger?.WriteLine("Stopping API server..."); ApiServer.Stop(); // Stop P2P server Logger?.WriteLine("Stopping P2P server..."); P2pServer.Stop(); // Dispose of all connected peers Logger?.WriteLine("Disposing of peers..."); foreach (var Peer in PeerList) { Peer.Dispose(); } // Stop blockchain handler Logger?.WriteLine("Stopping blockchain handler..."); Blockchain.Stop(); // Node stopped Logger?.Important("Node stopped."); }
// Stops the blockchain cache private void StopBlockchainCache() { // Stops the blockchain cache Blockchain.Stop(); Logger.Debug("Blockchain cache stopped"); }