-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Always add the payment address when probing an invoice #10439
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
Always add the payment address when probing an invoice #10439
Conversation
Summary of ChangesHello @ziggie1984, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a subtle but critical bug in the invoice probing mechanism. Previously, the payment address might not have been correctly included in probe requests due to an uninitialized slice, leading to potential issues in payment path finding. The change ensures that the payment address slice is always properly sized before data is copied, thereby guaranteeing that the payment address is consistently added when an invoice is probed, improving the reliability of the routing process. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request fixes a bug where probing an invoice with a payment address would not work correctly because the destination slice for the copy operation was not initialized. The change correctly initializes the slice before copying.
My review includes a comment pointing out a similar bug in the same function for LSP route probing, which should also be fixed to ensure the feature works as intended in all cases.
using copy for a slice of size 0 will not copy anything so we need to first initialize the slice before we do the deep copy.
7c1f960 to
ac30443
Compare
hieblmi
left a comment
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.
Thanks for the fix, LGTM!
|
Git push to origin failed for v0.20.x-branch with exitcode 1 |
|
Created backport PR for
Please cherry-pick the changes locally and resolve any conflicts. git fetch origin backport-10439-to-v0.20.x-branch
git worktree add --checkout .worktree/backport-10439-to-v0.20.x-branch backport-10439-to-v0.20.x-branch
cd .worktree/backport-10439-to-v0.20.x-branch
git reset --hard HEAD^
git cherry-pick -x 1c4bcc3b7dba14ed52c69f4b7041bd431d528c49 ac30443cc19b0213912bc704462ddf5af7feae50
git push --force-with-lease |
…20.x-branch [v0.20.x-branch] Backport #10439: Always add the payment address when probing an invoice
Fixes: #10438