Skip to content
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

Merged
merged 3 commits into from
Aug 2, 2024
Merged

Conversation

im-adithya
Copy link
Member

This solves people with private channels having issues with invoice creation

@im-adithya im-adithya requested a review from bumi August 2, 2024 08:06
@@ -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})
Copy link
Contributor

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

Copy link
Member Author

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?

Copy link
Member Author

@im-adithya im-adithya Aug 2, 2024

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)

@im-adithya im-adithya requested a review from rolznz August 2, 2024 12:00
Copy link
Contributor

@rolznz rolznz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK

@rolznz rolznz merged commit 9ae0712 into master Aug 2, 2024
8 checks passed
@rolznz rolznz deleted the task-lnd-invoice branch August 2, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants