Skip to content

Add balance and is_live fields to ChannelDetails #340

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

Merged

Conversation

TheBlueMatt
Copy link
Collaborator

This came up at lightning hack day munich as a useful field, and is pretty trivial to add.

Copy link

@ariard ariard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concet ACK bec6432

/// Note that there are some corner cases not fully handled here, so the actual available
/// inbound capacity may be slightly higher than this.
pub inbound_capacity_msat: u64,
/// True if the channel is (a) confirmed and funding_locked messages have been exchanged, (b)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's about channel_update with disable flags set ? Or if we detect channel transaction but closing hasn't get enough confs (and so channel isn't prune yet from channel graph) ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As for (a), we handle that in Router, and I'm still pretty confused as to how a peer can send that to you and have you do anything, do we implement it yet anyway?, as for (b) I think we prune it immediately, no?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, so "liveness" is just a ChannelManager view-based and doesn't rely on what the Router may receive (like a channel_update from peer disabling this channel, which is not implemented yet because #207 is still on stand-by)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think #207 should result in the Channel knowing if the counterparty sent us a channel_update disabling our own channel, then we could view it, but, yes.

@TheBlueMatt TheBlueMatt force-pushed the 2019-06-channeldetails-fields branch from bec6432 to 3d55d71 Compare July 18, 2019 22:02
@ariard
Copy link

ariard commented Jul 19, 2019

ACK 3d55d71, in fact after I've reworked #207 we may have something more accurate

@TheBlueMatt TheBlueMatt merged commit 100197c into lightningdevkit:master Jul 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants