static SyncTerminationCondition difficulty(
      final Difficulty targetDifficulty, final Blockchain blockchain) {
    return () ->
        blockchain.getChainHead().getTotalDifficulty().greaterOrEqualThan(targetDifficulty);
  }
When we want full sync to finish after reaching a difficulty. For instance when we merge on
total terminal difficulty.

@param targetDifficulty target difficulty to reach
@param blockchain blockchain to reach the difficulty on*
@return true when blockchain reaches difficulty
ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/fullsync/SyncTerminationCondition.java