code: public void downloadBlockChain() {
          DownloadProgressTracker listener = new DownloadProgressTracker();
          startBlockChainDownload(listener);
          try {
              listener.await();
          } catch (InterruptedException e) {
              throw new RuntimeException(e);
          }
      }
docs: Download the blockchain from peers. Convenience that uses a {@link DownloadProgressTracker} for you.<p>
  
  This method waits 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.