class RequestDataStep {

  public CompletableFuture<List<Task<NodeDataRequest>>> requestData(
      final List<Task<NodeDataRequest>> requestTasks,
      final BlockHeader blockHeader,
      final WorldDownloadState downloadState) {
    final List<Hash> hashes =
        requestTasks.stream()
            .map(Task::getData)
            .map(NodeDataRequest::getHash)
            .distinct()
            .collect(Collectors.toList());
    return sendRequest(blockHeader, hashes, downloadState)
        .thenApply(
            data -> {
              for (final Task<NodeDataRequest> task : requestTasks) {
                final NodeDataRequest request = task.getData();
                final Bytes matchingData = data.get(request.getHash());
                if (matchingData != null) {
                  request.setData(matchingData);
                }
              }
              return requestTasks;
            });
  }

  public  RequestDataStep(final EthContext ethContext, final MetricsSystem metricsSystem);
    RequestDataStep(
      final BiFunction<List<Hash>, Long, EthTask<Map<Hash, Bytes>>> getNodeDataTaskFactory);

}