In CheckBalance.scala, we try to group 3rd-stage htlc-delayed txs to their corresponding HTLC transaction:
|
.filter(htlcTx => localCommitPublished.claimHtlcDelayedTxs.exists(_.input.outPoint.txid == htlcTx.tx.txid)) |
However, that doesn't work with anchor outputs, where the htlc transaction we have in LocalCommitPublished does not match the htlc transaction that ends up confirming because fees are set in ReplaceableTxPublisher, which changes the txid.
We should instead use the irrevocablySpent map to map HTLC outputs of the commit tx to the txid of the confirmed HTLC tx that spends it?