-
Notifications
You must be signed in to change notification settings - Fork 20
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
fix: use private channels in invoice routing #386
Conversation
lnclient/lnd/lnd.go
Outdated
@@ -241,7 +241,7 @@ func (svc *LNDService) MakeInvoice(ctx context.Context, amount int64, descriptio | |||
expiry = lnclient.DEFAULT_INVOICE_EXPIRY | |||
} | |||
|
|||
resp, err := svc.client.AddInvoice(ctx, &lnrpc.Invoice{ValueMsat: amount, Memo: description, DescriptionHash: descriptionHashBytes, Expiry: expiry}) | |||
resp, err := svc.client.AddInvoice(ctx, &lnrpc.Invoice{ValueMsat: amount, Memo: description, DescriptionHash: descriptionHashBytes, Expiry: expiry, Private: true}) |
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.
I am not sure we should enable this always. LDK only enables it if you have no public channels
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.
But what is the guarantee that the public channels connect all the way from sender to us? Aren't we then lessening our chances of a successful payment?
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.
How does it work in LDK? Here this might also use public channels after setting the Private
flag (tested in Polar)
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.
tACK
This solves people with private channels having issues with invoice creation