LocalCommitPublished

data class LocalCommitPublished(commitTx: Transaction, claimMainDelayedOutputTx: Transactions.TransactionWithInputInfo.ClaimLocalDelayedOutputTx?, htlcTxs: Map<OutPoint, Transactions.TransactionWithInputInfo.HtlcTx?>, claimHtlcDelayedTxs: List<Transactions.TransactionWithInputInfo.ClaimLocalDelayedOutputTx>, claimAnchorTxs: List<Transactions.TransactionWithInputInfo.ClaimAnchorOutputTx>, irrevocablySpent: Map<OutPoint, Transaction>)

Details about a force-close where we published our commitment.

Parameters

commitTx

commitment tx.

claimMainDelayedOutputTx

tx claiming our main output (if we have one).

htlcTxs

txs claiming HTLCs. There will be one entry for each pending HTLC. The value will be null only for incoming HTLCs for which we don't have the preimage (we can't claim them yet).

claimHtlcDelayedTxs

3rd-stage txs (spending the output of HTLC txs).

claimAnchorTxs

txs spending anchor outputs to bump the feerate of the commitment tx (if applicable).

irrevocablySpent

map of relevant outpoints that have been spent and the confirmed transaction that spends them.

Constructors

LocalCommitPublished
Link copied to clipboard
common
fun LocalCommitPublished(commitTx: Transaction, claimMainDelayedOutputTx: Transactions.TransactionWithInputInfo.ClaimLocalDelayedOutputTx? = null, htlcTxs: Map<OutPoint, Transactions.TransactionWithInputInfo.HtlcTx?> = emptyMap(), claimHtlcDelayedTxs: List<Transactions.TransactionWithInputInfo.ClaimLocalDelayedOutputTx> = emptyList(), claimAnchorTxs: List<Transactions.TransactionWithInputInfo.ClaimAnchorOutputTx> = emptyList(), irrevocablySpent: Map<OutPoint, Transaction> = emptyMap())

Functions

isConfirmed
Link copied to clipboard
common
fun isConfirmed(): Boolean
isDone
Link copied to clipboard
common
fun isDone(): Boolean

A local commit is considered done when:

isHtlcSuccess
Link copied to clipboard
common
fun isHtlcSuccess(tx: Transaction): Boolean
isHtlcTimeout
Link copied to clipboard
common
fun isHtlcTimeout(tx: Transaction): Boolean
update
Link copied to clipboard
common
fun update(tx: Transaction): LocalCommitPublished

In CLOSING state, when we are notified that a transaction has been confirmed, we check if this tx belongs in the local commit scenario and keep track of it.

Properties

claimAnchorTxs
Link copied to clipboard
claimHtlcDelayedTxs
Link copied to clipboard
claimMainDelayedOutputTx
Link copied to clipboard
commitTx
Link copied to clipboard
common
val commitTx: Transaction
htlcTxs
Link copied to clipboard
common
val htlcTxs: Map<OutPoint, Transactions.TransactionWithInputInfo.HtlcTx?>
irrevocablySpent
Link copied to clipboard
common
val irrevocablySpent: Map<OutPoint, Transaction>