Listen to chain download events and print useful informational messages.
Progress, StartDownload, DoneDownload maybe be overridden to change the way the user is notified.

Methods are called with the event listener object locked so your implementation does not have to be thread safe. @author [email protected] (Miron Cuperman a.k.a. devrandom)

Inheritance: AbstractPeerEventListener
Exemplo n.º 1
0
        /// <summary>
        /// Download the block chain from peers.
        /// </summary>
        /// <remarks>
        /// This method wait until the download is complete. "Complete" is defined as downloading
        /// from at least one peer all the blocks that are in that peer's inventory.
        /// </remarks>
        public void DownloadBlockChain()
        {
            var listener = new DownloadListener();

            StartBlockChainDownload(listener);
            listener.Await();
        }
Exemplo n.º 2
0
 /// <summary>
 /// Download the block chain from peers.
 /// </summary>
 /// <remarks>
 /// This method wait until the download is complete. "Complete" is defined as downloading
 /// from at least one peer all the blocks that are in that peer's inventory.
 /// </remarks>
 public void DownloadBlockChain()
 {
     var listener = new DownloadListener();
     StartBlockChainDownload(listener);
     listener.Await();
 }