Add endpoint to force-close LN-DLC channel #1895
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We may need this until all LN-DLC channels are closed. This serves as a less efficient alternative to collaborative revert, as it doesn't require cooperation with the counterparty and it may work when either party lacks all the data needed to perform the collaborative revert protocol.
I manually tested this by opening an LN-DLC channel (with a position) on version 1.7.4 and force-closing it using the same coordinator but updated to this branch. I've verified that the LN money is claimed on both sides after mining sufficient blocks. The DLC money is a bit more finicky because we have to mess with the expiry time, but given that this was already tested and that we haven't changed any of that code and that it was tested in
ln-dlc-node
on version 1.7.4, I don't see any risk.