Skip to content

bcli: Filter for full nodes on getpeerinfo #8078

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

Open
nepet opened this issue Feb 11, 2025 · 0 comments · May be fixed by #8268
Open

bcli: Filter for full nodes on getpeerinfo #8078

nepet opened this issue Feb 11, 2025 · 0 comments · May be fixed by #8268
Assignees
Milestone

Comments

@nepet
Copy link
Collaborator

nepet commented Feb 11, 2025

@NicolasDorier pointed out that fetching blocks from peers is slowed down due to us not filtering for nodes with a the serviceflag NODE_NETWORK set.

lightning/plugins/bcli.c

Lines 630 to 633 in 9c39410

JSON_SCAN(json_to_int, &id)) == NULL) {
// fixme: future optimization: a) filter for full nodes,
// b) sort by last ping
tal_arr_expand(&stash->peers, id);

@nepet nepet self-assigned this Feb 11, 2025
@nepet nepet added this to the v25.05 milestone Feb 11, 2025
rustyrussell added a commit to rustyrussell/lightning that referenced this issue May 6, 2025
Suggested-by: @NicolasDorier
Closes: ElementsProject#8078
Signed-off-by: Rusty Russell <[email protected]>
Changelog-Changed: Protocol: we no longer try asking for blocks from bitcoind's peers if they don't store blocks.
rustyrussell added a commit to rustyrussell/lightning that referenced this issue May 6, 2025
Suggested-by: @NicolasDorier
Closes: ElementsProject#8078
Signed-off-by: Rusty Russell <[email protected]>
Changelog-Changed: Protocol: we no longer try asking for blocks from bitcoind's peers if they don't store blocks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant