class LoadLocalDataStep {

  public Stream<Task<NodeDataRequest>> loadLocalData(
      final Task<NodeDataRequest> task, final Pipe<Task<NodeDataRequest>> completedTasks) {
    final NodeDataRequest request = task.getData();
    final Optional<Bytes> existingData = request.getExistingData(worldStateStorage);
    if (existingData.isPresent()) {
      existingNodeCounter.inc();
      request.setData(existingData.get());
      request.setRequiresPersisting(false);
      completedTasks.put(task);
      return Stream.empty();
    }
    return Stream.of(task);
  }

  public  LoadLocalDataStep(
      final WorldStateStorage worldStateStorage, final MetricsSystem metricsSystem);

}