@Override
  public BlockCreationResult createBlock(final long timestamp, final BlockHeader parentHeader) {
    ProtocolSpec protocolSpec =
        ((BftProtocolSchedule) protocolSchedule)
            .getByBlockNumberOrTimestamp(parentHeader.getNumber() + 1, timestamp);

    if (protocolSpec.getWithdrawalsValidator() instanceof WithdrawalsValidator.AllowedWithdrawals) {
      return createEmptyWithdrawalsBlock(timestamp, parentHeader);
    } else {
      return createBlock(Optional.empty(), Optional.empty(), timestamp, parentHeader);
    }
  }
Instantiates a new Bft block creator.

@param miningConfiguration the mining parameters
@param forksSchedule the forks schedule
@param localAddress the local address
@param extraDataCalculator the extra data calculator
@param transactionPool the pending transactions
@param protocolContext the protocol context
@param protocolSchedule the protocol schedule
@param bftExtraDataCodec the bft extra data codec
@param ethScheduler the scheduler for asynchronous block creation tasks
consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/blockcreation/BftBlockCreator.java