@Override
  protected Object resultByBlockNumber(
      final JsonRpcRequestContext request, final long blockNumber) {
    final Optional<BlockHeader> blockHeader =
        getBlockchainQueries().getBlockHeaderByNumber(blockNumber);
    LOG.trace("Received RPC rpcName={} block={}", getName(), blockNumber);
    return blockHeader
        .map(
            header ->
                validatorProvider.getValidatorsForBlock(header).stream()
                    .map(Address::toString)
                    .collect(Collectors.toList()))
        .orElse(null);
  }
Instantiates a new Qbft get validators by block number.

@param blockchainQueries the blockchain queries
@param validatorProvider the validator provider
consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/jsonrpc/methods/QbftGetValidatorsByBlockNumber.java