code: public void addBlocksDownloadedEventListener(Executor executor, BlocksDownloadedEventListener listener) {
          peersBlocksDownloadedEventListeners.add(new ListenerRegistration<>(checkNotNull(listener), executor));
          for (Peer peer : getConnectedPeers())
              peer.addBlocksDownloadedEventListener(executor, listener);
          for (Peer peer : getPendingPeers())
              peer.addBlocksDownloadedEventListener(executor, listener);
      }
docs: <p>Adds a listener that will be notified on the given executor when
  blocks are downloaded by the download peer.</p>
  @see Peer#addBlocksDownloadedEventListener(Executor, BlocksDownloadedEventListener)