@Override
  public void mergeStateChanged(
      final boolean isPoS,
      final Optional<Boolean> oldState,
      final Optional<Difficulty> difficultyStoppedAt) {
    if (isPoS && difficultyStoppedAt.isPresent()) {
      terminalTotalDifficulty.set(difficultyStoppedAt.get());
    }
  }
Instantiates a new Transition best peer comparator.

@param configuredTerminalTotalDifficulty the configured terminal total difficulty
consensus/merge/src/main/java/org/hyperledger/besu/consensus/merge/TransitionBestPeerComparator.java