-
Notifications
You must be signed in to change notification settings - Fork 407
Expose whether a channel is closing in ChannelDetails
#2304
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
Comments
Trivial and user-requested so tagging 116. |
@valentinewallace I'd like to work on this. Some observations (CMIIW) Have a couple of questions. |
Yeah the type is public so you're free to use it as you like, the docs there are more about conveying when a channel will be in such a state.
See the rationale here: #1294. I don't think switching
This only applies to channels closed cooperatively that have not had their closing transaction confirmed yet. As soon as a closing transaction confirms (regardless of it being cooperative or not), we delete the channel state in |
@valentinewallace @wpaulino sorry for the delay, spent some time tracing the code to understand more about channel closures and how they get propagated through the system currenlty added the shutting down flag as a new field. do let me know if thats not the right direction. |
Currently, there's no definitive way to know that a channel has closed via
ChannelDetails
.!is_channel_ready && confirmations >= confirmations_required
gets you close, but it's still possible that you've just been disconnected to the counterparty since before the channel's confirmation.We might want to switch from
is_channel_ready
to an enum with the channel's current status. Or maybe we could add some kind oflist_closed_channels
util.The text was updated successfully, but these errors were encountered: