Skip to content

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

Merged
merged 4 commits into from
May 12, 2021

Conversation

TheBlueMatt
Copy link
Contributor

Relies on lightningdevkit/rust-lightning#912 for the last commit

@TheBlueMatt TheBlueMatt force-pushed the main branch 4 times, most recently from 1f42069 to e6682fe Compare May 9, 2021 00:05
@TheBlueMatt
Copy link
Contributor Author

This should be good to go now, modulo squashing fixup commits.

src/main.rs Outdated
Comment on lines 591 to 596
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()]);
}
}
Copy link
Collaborator

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;

Copy link
Contributor Author

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.

Copy link
Collaborator

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?

Copy link
Contributor Author

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.

@TheBlueMatt TheBlueMatt force-pushed the main branch 2 times, most recently from 12886b7 to 4d4789d Compare May 10, 2021 14:03
Copy link
Collaborator

@jkczyz jkczyz left a 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.
@jkczyz
Copy link
Collaborator

jkczyz commented May 12, 2021

Sorry, somehow I missed that this was squashed.

@jkczyz jkczyz merged commit 3f92528 into lightningdevkit:main May 12, 2021
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.

3 participants