-
Notifications
You must be signed in to change notification settings - Fork 98
Small tweaks to logging and printing + node_announcement #7
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
Conversation
1f42069
to
e6682fe
Compare
This should be good to go now, modulo squashing fixup commits. |
src/main.rs
Outdated
for chan_info in chan_manager.list_usable_channels() { | ||
if chan_info.is_public { | ||
chan_manager.broadcast_node_announcement([0; 3], args.ldk_announced_node_name, | ||
vec![args.ldk_announced_listen_addr.as_ref().unwrap().clone()]); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this only broadcast once rather than for each public channel?
let has_public_channels = chan_manager
.list_usable_channels()
.iter()
.filter(|chan_info| chan_info.is_public)
.count() > 0;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh duh. I'm gonna drop the checks entirely, after upstream/913 we don't need them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just so I understand, when upstream/913 is in this code will be removed entirely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, as in "the extra if statement around chan_info.is_public
is moved into broadcast_node_announcement
in upstream/913, so we can go ahead and drop it here.
12886b7
to
4d4789d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Please squash fixups.
User feedback found `channel_can_send_payments` confusing on its own, and now that we have an upstream `is_confirmed` field, print that. Further, it is useful to have an explicit txid field, even if if is basically duplicative with channel_id.
Sorry, somehow I missed that this was squashed. |
Relies on lightningdevkit/rust-lightning#912 for the last commit