-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't mutual close with pending HTLC #6039
Comments
We're aware and plan to fix this in the future |
Related issue: #4819 |
On the API level we return this error so the user gets quick feedback that a co-op close isn't possible at that time. On the p2p level, we currently use the same codepath, but should instead defer and wait till things clear up (or the channel force closes?). |
This is one area of the spec I had trouble with. I think the spec could use better wording here also. |
prioed 17 |
I like this potential feature and would like to implement it, is it up for grabs ? |
No this is not up for grabs |
LND hasn't properly handled shutdown messages ever, and force-closes any time we send one while HTLCs are still present. The issue is tracked at lightningnetwork/lnd#6039 and has had multiple patches to fix it but none so far have managed to land upstream. The issue appears to be very low priority for the LND team despite being marked "P1". We're not going to bother handling this in a sensible way, instead simply repeated the Shutdown message on repeat until morale improves.
LND hasn't properly handled shutdown messages ever, and force-closes any time we send one while HTLCs are still present. The issue is tracked at lightningnetwork/lnd#6039 and has had multiple patches to fix it but none so far have managed to land upstream. The issue appears to be very low priority for the LND team despite being marked "P1". We're not going to bother handling this in a sensible way, instead simply repeated the Shutdown message on repeat until morale improves.
LND hasn't properly handled shutdown messages ever, and force-closes any time we send one while HTLCs are still present. The issue is tracked at lightningnetwork/lnd#6039 and has had multiple patches to fix it but none so far have managed to land upstream. The issue appears to be very low priority for the LND team despite being marked "P1". We're not going to bother handling this in a sensible way, instead simply repeated the Shutdown message on repeat until morale improves.
Ok. I think I have a decent handle on what's going on here. The issue is that when we receive the I believe the appropriate thing to do here is to make it a property of the channel link. If we do that then we can handle the shutdown message in a way that puts the link into this flushing state, and we can similarly handle it from the gRPC interface as well. |
LND hasn't properly handled shutdown messages ever, and force-closes any time we send one while HTLCs are still present. The issue is tracked at lightningnetwork/lnd#6039 and has had multiple patches to fix it but none so far have managed to land upstream. The issue appears to be very low priority for the LND team despite being marked "P1". We're not going to bother handling this in a sensible way, instead simply repeated the Shutdown message on repeat until morale improves.
@ProofOfKeags yep, we've done that here in this PR: #6760. We ultimately decided the implementation was more invasive than ideal, to instead go with a simplified approach. |
Background
When trying to close a channel with a lnd node, the node returned the error
cannot co-op close channel w/ active htlcs
Steps to reproduce
Open a channel to a lnd node, add a HTLC , send a shutdown message.
Expected behaviour
The node should wait for the HTLC to be resolved, not add any new HTLC, and then reply with a shutdown message.
BOLT 2: Channel Close
Actual behaviour
The lnd node returns an error:
cannot co-op close channel w/ active htlcs
The text was updated successfully, but these errors were encountered: