public List<Block> retrieveBlocksFromPeers() {
    while (remainingBlocks > 0) {
      LOG.atDebug()
          .setMessage("Requesting {} bodies from peer")
          .addArgument(headersToGet.size())
          .log();
      final GetBodiesFromPeerTask task = new GetBodiesFromPeerTask(headersToGet, protocolSchedule);
      final PeerTaskExecutorResult<List<Block>> executionResult = peerTaskExecutor.execute(task);
      if (executionResult.responseCode() == PeerTaskExecutorResponseCode.SUCCESS
          && executionResult.result().isPresent()) {
        final List<Block> blockList = executionResult.result().get();
        LOG.atDebug()
            .setMessage("Received {} bodies out of {} from peer")
            .addArgument(blockList.size())
            .addArgument(headersToGet.size())
            .log();
        blockList.forEach(
            block -> {
              remainingBlocks--;
              result[nextIndex] = block;
              headersToGet.removeFirst();
              nextIndex = findNextIndex(nextIndex + 1);
            });
      }
    }
    return List.of(result);
  }
Retrieves all remaining blocks from connected peers. Subsequent calls will have no affect.

@return A List of all blocks for the headers supplied when constructing this
    CompleteBlocksWithPeerTask
ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/tasks/CompleteBlocksWithPeerTask.java