RemoteCommitPublished

data class RemoteCommitPublished(commitTx: Transaction, claimMainOutputTx: Transactions.TransactionWithInputInfo.ClaimRemoteCommitMainOutputTx?, claimHtlcTxs: Map<OutPoint, Transactions.TransactionWithInputInfo.ClaimHtlcTx?>, claimAnchorTxs: List<Transactions.TransactionWithInputInfo.ClaimAnchorOutputTx>, irrevocablySpent: Map<OutPoint, Transaction>)

Details about a force-close where they published their commitment.

Parameters

commitTx

commitment tx.

claimMainOutputTx

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

claimHtlcTxs

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).

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

RemoteCommitPublished
Link copied to clipboard
common
fun RemoteCommitPublished(commitTx: Transaction, claimMainOutputTx: Transactions.TransactionWithInputInfo.ClaimRemoteCommitMainOutputTx? = null, claimHtlcTxs: Map<OutPoint, Transactions.TransactionWithInputInfo.ClaimHtlcTx?> = emptyMap(), claimAnchorTxs: List<Transactions.TransactionWithInputInfo.ClaimAnchorOutputTx> = emptyList(), irrevocablySpent: Map<OutPoint, Transaction> = emptyMap())

Functions

isClaimHtlcSuccess
Link copied to clipboard
common
fun isClaimHtlcSuccess(tx: Transaction): Boolean
isClaimHtlcTimeout
Link copied to clipboard
common
fun isClaimHtlcTimeout(tx: Transaction): Boolean
isConfirmed
Link copied to clipboard
common
fun isConfirmed(): Boolean
isDone
Link copied to clipboard
common
fun isDone(): Boolean

A remote commit is considered done when all commitment tx outputs that we can spend have been spent and confirmed (even if the spending tx was not ours).

update
Link copied to clipboard
common
fun update(tx: Transaction): RemoteCommitPublished

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

Properties

claimAnchorTxs
Link copied to clipboard
claimHtlcTxs
Link copied to clipboard
common
val claimHtlcTxs: Map<OutPoint, Transactions.TransactionWithInputInfo.ClaimHtlcTx?>
claimMainOutputTx
Link copied to clipboard
commitTx
Link copied to clipboard
common
val commitTx: Transaction
irrevocablySpent
Link copied to clipboard
common
val irrevocablySpent: Map<OutPoint, Transaction>