private Predicate<ScheduledProtocolSpec> protocolSpecMatchesConsensusBlockRange(
      final long startBlock, final Optional<Long> endBlock) {
    return scheduledProtocolSpec ->
        scheduledProtocolSpec.fork().milestone() >= startBlock
            && endBlock.map(b -> scheduledProtocolSpec.fork().milestone() < b).orElse(true);
  }
Create protocol schedule.

@param forkSpecs the fork specs
@param chainId the chain id
@return the protocol schedule
consensus/common/src/main/java/org/hyperledger/besu/consensus/common/CombinedProtocolScheduleFactory.java