lnd icon indicating copy to clipboard operation
lnd copied to clipboard

addinvoice: provide hop hints for no-amount invoice

Open bodhike opened this issue 3 years ago • 5 comments
trafficstars

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

📝 Please see our Contribution Guidelines for further guidance.

bodhike avatar Oct 25 '22 09:10 bodhike

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:

bodhike avatar Oct 25 '22 15:10 bodhike

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.

bodhike avatar Oct 26 '22 20:10 bodhike

Kicked off CI - perhaps there are linter issues

joostjager avatar Oct 27 '22 14:10 joostjager

@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?

bodhike avatar Oct 31 '22 09:10 bodhike

I am not sure what the status of the itests is. I see them failing a lot generally.

joostjager avatar Nov 01 '22 09:11 joostjager

@yyforyongyu I've pushed again addressing your feedback. LMKWYT.

bodhike avatar Nov 08 '22 14:11 bodhike

Thanks @yyforyongyu! I've updated the release notes in the latest commit, and I'll keep an eye open on #7126 :+1:

bodhike avatar Nov 09 '22 13:11 bodhike

Needs a rebase because of a conflict in the release notes.

guggero avatar Nov 09 '22 13:11 guggero

I've rebased and fixed the conflicts again, and the itests are a little better now :+1: :pray:

bodhike avatar Nov 13 '22 10:11 bodhike