private long getNextGasLimit(
      final ProtocolSpec protocolSpec, final BlockHeader parentHeader, final long blockNumber) {
    return protocolSpec
        .getGasLimitCalculator()
        .nextGasLimit(
            parentHeader.getGasLimit(),
            miningConfiguration.getTargetGasLimit().orElse(parentHeader.getGasLimit()),
            blockNumber);
  }
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