lnd
lnd copied to clipboard
lncli+lnrpc: add hints flag to addinvoice command
Change Description
This PR introduces the new flag hints for the addinvoice command. hints sets the number of routing hints the invoice should include. Poor channel liquidity may result in more hints than specified being added, lack of private channels in less. The maximum number of hints stays at 20. The private flag behavior is unchanged and keeps its focus on privacy. The private, hints, amt and amt_msat flags can be used together or separately depending on the desired result.
Fixes #7305.
Steps to Test
Create a private invoice with enough private channels.
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
- [x] The change obeys the Code Documentation and Commenting guidelines, and lines wrap at 80.
- [x] Commits follow the Ideal Git Commit Structure.
- [x] Any new logging statements use an appropriate subsystem and logging level.
- [x] 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 reviews. This is turning into a different PR so I have edited the title and description. The new approach is to add a hints flag to the addinvoice command.
What is the correct way to compile the proto files? Is there a Docker image I should use?
I'm following the readmes and have Docker and Go installed. It seems to compile and format in Docker but even the source gives me formatting errors. Here's what I do:
git clone https://github.com/lightningnetwork/lnd
cd lnd
make rpc-check
Errors with "Protos not properly formatted or not compiled with v3.4.0".
You need to run make rpc to compile them. The make rpc-check is for the CI to check that the protos were compiled.
Is this still under development? cc @hotorb-code
I'm working on this again and made some changes.
is this still active? if so could you do a rebase? thanks!
@positiveblue: review reminder @yyforyongyu: review reminder
@positiveblue: review reminder @yyforyongyu: review reminder
!lightninglabs-deploy mute
replaced by: https://github.com/lightningnetwork/lnd/pull/8819
EDIT: well, at least the cmd part of it. So if you want to continue with this, @hotorb-code, then perhaps can just update it to just do the "NumHopHints" part