compareTo

open operator override fun compareTo(other: Transactions.CommitmentOutputLink<T>): Int

We sort HTLC outputs according to BIP69 + CLTV as tie-breaker for offered HTLC, we do this only for the outgoing HTLC because we must agree with the remote on the order of HTLC-Timeout transactions even for identical HTLC outputs. See https://github.com/lightningnetwork/lightning-rfc/issues/448#issuecomment-432074187.