Associate commitment transaction with a closed channel #2407
Replies: 2 comments
-
It should definitely be exposed by LDK somehow. |
Beta Was this translation helpful? Give feedback.
-
The simplest way is to track the funding outpoint of your channels. With that info, you can always go to a block explorer and ask it what transaction spent the given outpoint. We should, however, provide more info in |
Beta Was this translation helpful? Give feedback.
-
At the moment ldk deletes the channel after it has been closed. If I want to keep the channel data around after it has been deleted it's the responsibility of the app layer. But there are a couple of challenges with that approach.
ChannelClosed
Event does not refer the commitment transaction. So I do know that the channel was closed, but not with what transaction.SpendableOutput
Event, but at this point I do not know the Channel this commitment transaction is closing.I thought about fetching that information through the spent input transaction on the commitment transaction, which has to be the funding transaction and thus get the association with the channel. But this seems to be overly complicated in comparison to ldk simply keeping the channel data after it has been closed and adding the commitment transaction to it once closed. Or at least adding the commitment txid to the
ChannelClosed
Event.It's very likely that I am missing how to add the association of a commitment transaction to a closed channel more easily. Any advice would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions