Looking up invoices that were created as "private" invoices does not reflect their private status as created.
d4b042dc1946ece8b60d538ade8e912f035612fe67e573d211ace594f1366b4ce9d39726c4b19bd0addInvoice - private set to `truelookupInvoice - invoice idResponse should indicate that the invoice is a "private" invoice
Response indicates private is false
I could take a look at this.
We use the exact same proto/struct for both the response and request. However, atm, we don't also include this value when printing out the response. This should definitely be made consistent, I've had a few other people bring this up in the past.
Atm we don't store the private setting in the database. Is there a reason for not doing this?
My experimental code adds this setting to all new invoices before they are stored in the database. Because of this, I'm forced to do some nasty tests to keep backward comparability when reading old invoices from the db, which would be nice to get rid of. I'm not sure how I should precede with this one.
--private is only indicating that private __channels__ should be used as hop hints. There's no such thing as a private invoice I think.
With current lnd behavior if we want to make the lookup reflect the initial setting, we can just check if there are any routing hints in the invoice, meaning it was created with the --private option.
More clarity is needed on how exactly --private is supposed to behave.
If I have a node and it has only private channels, my invoice MUST use routing hints and lnd DOES append routing hints regardless of whether I use --private.
If I have a node and it only has public channels, my invoice doesn't need routing hints and lnd DOES NOT append routing hints regardless of whether I use --private.
If my node has both public and private channels, what should I expect the behavior of --private to be?
Testing a node with one public and one private channel to the same node, and lnd DOES append routing hints regardless of whether I use --private.
Testing a node with one public and one private channel to different nodes, and lnd DOES append routing hints regardless of whether I use --private.
The public and private channels are configured identically except for the --private setting. Given the option between public and private channels, lnd chooses the private channel + route hint whether or not --private is used.
"version": "0.5.1-beta commit=v0.5.1-beta-rc2-4-gd6d833c2421f4a65c6db5190d1dcd73f549fbf70"
The public and private channels are configured identically except for the --private setting. Given the option between public and private channels, lnd chooses the private channel + route hint whether or not --private is used.
This is because invoices created through the CLI will set private=true regardless of whether or not you specified it. If you wish to not include any, you have to do so explicitly with private=false.
Fixed by #2222.
Most helpful comment
I could take a look at this.