LocalCommit

data class LocalCommit(index: Long, spec: CommitmentSpec, publishableTxs: PublishableTxs)

Properties

index
Link copied to clipboard
common
val index: Long
publishableTxs
Link copied to clipboard
common
val publishableTxs: PublishableTxs
spec
Link copied to clipboard
common
val spec: CommitmentSpec

Extensions

extractPreimages
Link copied to clipboard
common
fun LocalCommit.extractPreimages(tx: Transaction): Set<Pair<UpdateAddHtlc, ByteVector32>>

In CLOSING state, any time we see a new transaction, we try to extract a preimage from it in order to fulfill the corresponding incoming htlc in an upstream channel.

timedOutHtlcs
Link copied to clipboard
common
fun LocalCommit.timedOutHtlcs(localCommitPublished: LocalCommitPublished, localDustLimit: Satoshi, tx: Transaction): Set<UpdateAddHtlc>

In CLOSING state, when we are notified that a transaction has been confirmed, we analyze it to find out if one or more htlcs have timed out and need to be failed in an upstream channel.