protected SyncTerminationCondition getFullSyncTerminationCondition(final Blockchain blockchain) {
    return genesisConfigOptions
        .getTerminalTotalDifficulty()
        .map(difficulty -> SyncTerminationCondition.difficulty(difficulty, blockchain))
        .orElse(SyncTerminationCondition.never());
  }
Gets full sync termination condition.

@param blockchain the blockchain
@return the full sync termination condition
app/src/main/java/org/hyperledger/besu/controller/BesuControllerBuilder.java