private void sendHistoryReport(final List<Long> blocks) {
    final List<BlockResult> blockResults = new ArrayList<>();

    blocks.forEach(
        blockNumber ->
            blockchainQueries
                .blockByNumber(blockNumber)
                .map(tx -> blockResultFactory.transactionComplete(tx, false))
                .ifPresent(blockResults::add));

    if (!blockResults.isEmpty()) {
      sendMessage(
          webSocket,
          new EthStatsRequest(
              HISTORY,
              ImmutableHistoryReport.of(enodeURL.getNodeId().toHexString(), blockResults)));
    }
  }
Sends a report concerning a set of blocks (range, list of blocks)
ethereum/ethstats/src/main/java/org/hyperledger/besu/ethstats/EthStatsService.java