Skip to content

Balance check doesn't work for HTLC outputs during force-close #3085

@t-bast

Description

@t-bast

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?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions