lnd
lnd copied to clipboard
addinvoice: provide hop hints for no-amount invoice
Change Description
This change allows creating no-amount private invoices that do provide hop hints, up to maxHopHints.
Fixes #6738
Steps to Test
The testInvoiceRoutingHints itest was expanded to account for this use case.
If someone can provide some pointers on how to easily decode the payment request response from lncli addinvoice, I'd be glad to provide an example from the end-user's perspective.
This itest and the added unit test case fail before the change to addinvoice.go (given that change was so minimal, I clubbed it together in the same commit with the unit test change, but I can separate them if deemed necessary :slightly_smiling_face: ).
Pull Request Checklist
Testing
- [ ] Your PR passes all CI checks.
- [ ] Tests covering the positive and negative (error paths) are included.
- [ ] Bug fixes contain tests triggering the bug to prevent regressions.
Code Style and Documentation
- [ ] The change obeys the Code Documentation and Commenting guidelines, and lines wrap at 80.
- [ ] Commits follow the Ideal Git Commit Structure.
- [ ] Any new logging statements use an appropriate subsystem and logging level.
- [ ] There is a change description in the release notes, or
[skip ci]in the commit message for small changes.
📝 Please see our Contribution Guidelines for further guidance.
Thanks for the prompt review @positiveblue :pray:
I've pushed a fixup for merging the ifs and a separate commit for the use require refactoring :boom:
Thanks @joostjager, I've rebased and rearranged commits, putting first the refactorings and typo fixes. The last three commits contain the functional change, new unit test case and new itest case, respectively.
Kicked off CI - perhaps there are linter issues
@joostjager It appears the linter job succeeded. OTOH most of the (old?) itests are also failing in master. Is there a particular issue I should pay attention to?
I am not sure what the status of the itests is. I see them failing a lot generally.
@yyforyongyu I've pushed again addressing your feedback. LMKWYT.
Thanks @yyforyongyu! I've updated the release notes in the latest commit, and I'll keep an eye open on #7126 :+1:
Needs a rebase because of a conflict in the release notes.
I've rebased and fixed the conflicts again, and the itests are a little better now :+1: :pray: