update

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.

We need to keep track of all transactions spending the outputs of the commitment tx, because some outputs can be spent both by us and our counterparty. Because of that, some of our transactions may never confirm and we don't want to wait forever before declaring that the channel is CLOSED.

Parameters

tx

a transaction that has been irrevocably confirmed