private Wei getNextBaseFee(
      final ProtocolSpec protocolSpec, final BlockHeader parentHeader, final long blockNumber) {
    return Optional.of(protocolSpec.getFeeMarket())
        .filter(FeeMarket::implementsBaseFee)
        .map(BaseFeeMarket.class::cast)
        .map(
            feeMarket ->
                feeMarket.computeBaseFee(
                    blockNumber,
                    parentHeader.getBaseFee().orElse(Wei.ZERO),
                    parentHeader.getGasUsed(),
                    feeMarket.targetGasUsed(parentHeader)))
        .orElse(null);
  }
Applies block header overrides to the block header.

@param header The original block header.
@param newProtocolSpec The ProtocolSpec for the block.
@param blockOverrides The BlockOverrides to apply.
@return The modified block header.
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/transaction/BlockSimulator.java