class FetchRecentBlocksService extends Service {

  public void requestRecentBlock(final Bytes32 blockRoot) {
    if (pendingBlocksPool.contains(blockRoot)) {
      // We've already got this block
      return;
    }
    final FetchBlockTask task = fetchBlockTaskFactory.create(eth2Network, blockRoot);
    if (allTasks.putIfAbsent(blockRoot, task) != null) {
      // We're already tracking this task
      task.cancel();
      return;
    }
    LOG.trace("Queue block to be fetched: {}", blockRoot);
    queueTask(task);
  }

    FetchRecentBlocksService(
      final AsyncRunner asyncRunner,
      final P2PNetwork<Eth2Peer> eth2Network,
      final PendingPool<SignedBeaconBlock> pendingBlocksPool,
      final FetchBlockTaskFactory fetchBlockTaskFactory,
      final int maxConcurrentRequests);

}