It's a case when a local node closes the channel unilaterally with broadcasting its local commitment transaction that contains to_local
output below. This output is spent by a transaction with nSequence field set to to_self_delay
(which can only be valid after that duration has passed.)
OP_IF
# Penalty transaction
<revocationpubkey>
OP_ELSE
`to_self_delay`
OP_CHECKSEQUENCEVERIFY
OP_DROP
<local_delayedpubkey>
OP_ENDIF
OP_CHECKSIG
It's a commitment transaction on Testnet as following.
txid: 4f8d776c85b1fc15c1125e7043a9aee70e33f0793b472823e3946a8de075bec4
to_local
output:
6321026644cb387614f66421d14da3596c21cffa239011416c9adf3f351ee8551a9fc767029000b27521029654f80732769d7c435a184a3559f12178315526c53bbf003349390811c7590a68ac
decoded output:
{
"asm": "OP_IF 026644cb387614f66421d14da3596c21cffa239011416c9adf3f351ee8551a9fc7 OP_ELSE 144 OP_CHECKSEQUENCEVERIFY OP_DROP 029654f80732769d7c435a184a3559f12178315526c53bbf003349390811c7590a OP_ENDIF OP_CHECKSIG",
"type": "nonstandard",
"p2sh": "35M7MGVGd3ajyiTMvriUiyUM3H2cT5sgb4"
}
The commitment transaction got mined in 1356328
block height, and to_self_delay
is 144
, so the output can be spent after it reaches 1356183
block height.