Spec says that the equality is based on outputs, which are in sats:
Lexicographic ordering: see BIP69. In the case of identical HTLC outputs, the outputs are ordered in increasing cltv_expiry order.
We're using the millisatoshi amount:
|
def sort(a: CommitmentOutputLink[CommitmentOutput], b: CommitmentOutputLink[CommitmentOutput]): Boolean = (a.commitmentOutput, b.commitmentOutput) match { |
|
case (OutHtlc(OutgoingHtlc(htlcA)), OutHtlc(OutgoingHtlc(htlcB))) if htlcA.paymentHash == htlcB.paymentHash && htlcA.amountMsat == htlcB.amountMsat => |
|
htlcA.cltvExpiry <= htlcB.cltvExpiry |
|
case _ => LexicographicalOrdering.isLessThan(a.output, b.output) |
|
} |
|
} |
This causes commitment sig mismatch and force closes.
Thanks @Roasbeef for the debug!
Spec says that the equality is based on outputs, which are in sats:
We're using the millisatoshi amount:
eclair/eclair-core/src/main/scala/fr/acinq/eclair/transactions/Transactions.scala
Lines 309 to 314 in 898c17b
This causes commitment sig mismatch and force closes.
Thanks @Roasbeef for the debug!