public static boolean isTerminalProofOfWorkBlock(
      final ProcessableBlockHeader header, final ProtocolContext context) {

    Difficulty headerDifficulty =
        Optional.ofNullable(header.getDifficulty()).orElse(Difficulty.ZERO);

    Difficulty currentChainTotalDifficulty =
        context
            .getBlockchain()
            .getTotalDifficultyByHash(header.getParentHash())
            // if we cannot find difficulty or are merge-at-genesis
            .orElse(Difficulty.ZERO);

    final MergeContext consensusContext = context.getConsensusContext(MergeContext.class);

    // Genesis is configured for post-merge we will never have a terminal pow block
    if (consensusContext.isPostMergeAtGenesis()) {
      return false;
    }

    if (currentChainTotalDifficulty.isZero()) {
      LOG.atWarn()
          .setMessage("unable to get total difficulty for {}, parent hash {} difficulty not found")
          .addArgument(header::toLogString)
          .addArgument(header::getParentHash)
          .log();
    }
    Difficulty configuredTotalTerminalDifficulty = consensusContext.getTerminalTotalDifficulty();

    if (currentChainTotalDifficulty
            .add(headerDifficulty)
            .greaterOrEqualThan(
                configuredTotalTerminalDifficulty) // adding would equal or go over limit
        && currentChainTotalDifficulty.lessThan(
            configuredTotalTerminalDifficulty) // parent was under
    ) {
      return true;
    }

    // return true for genesis block when merge-at-genesis, otherwise false
    return header.getNumber() == 0L
        && header.getDifficulty().greaterOrEqualThan(configuredTotalTerminalDifficulty);
  }
Is terminal proof of work block boolean.

@param header the header
@param context the context
@return the boolean
consensus/merge/src/main/java/org/hyperledger/besu/consensus/merge/TransitionUtils.java