-
Notifications
You must be signed in to change notification settings - Fork 339
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
Add helper functions to verify node and channel annoucements #2307
Conversation
08340dd
to
76aedb4
Compare
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## main #2307 +/- ##
==========================================
- Coverage 90.87% 90.79% -0.08%
==========================================
Files 104 104
Lines 52926 53017 +91
Branches 52926 53017 +91
==========================================
+ Hits 48094 48137 +43
- Misses 4832 4880 +48
☔ View full report in Codecov by Sentry. |
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, just two minor doc nits.
76aedb4
to
5deffaa
Compare
@tnull done |
We could expose a method that either:
|
Looks fine to me either way, but please include the rationale you have here in the commit message, not just the PR text - the git history is what matters, github is just the (bad) UI we use to update it today :) |
5deffaa
to
70d164c
Compare
added |
Sorry for the delay here, but please keep commit messages wrapped at 70 chars unless you're quoting something specific that is longer. This applies both to the title and the body of the commit message itself. |
Right now the only real way to verify the node and channel announcements is to call `update_node_from_announcement`/ `update_channel_from_announcement`. If you want to do some processing before you add to your network graph then you need to manually verify the signature. This adds some nice helper functions to make it easier. I tried to do the same for channel update but it did not seem as easy so figured that is fine to punt on since I don't see many people doing manual things with channel updates.
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.
Edited the commit message to wrap the lines, somehow @tnull's approval is still valid, maybe if the commit diff didn't change github allows it?
Right now the only real way to verify the node and channel announcements is to call
update_node_from_announcement
/update_channel_from_announcement
. If you want to do some processing before you add to your network graph then you need to manually verify the signature. This adds some nice helper functions to make it easier.I tried to do the same for channel update but it did not seem as easy so figured that is fine to punt on since I don't see many people doing manual things with channel updates.