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

[bug]: force Private=false for regular invoices like is done for hold invoices. #1205

Closed
ZZiigguurraatt opened this issue Nov 20, 2024 · 1 comment
Labels
bug Something isn't working needs triage

Comments

@ZZiigguurraatt
Copy link

At

taproot-assets/rpcserver.go

Lines 7277 to 7279 in 77e8b28

// We set private to false as we don't want to
// add any hop hints other than this one.
Private: false,

we force private to false for hold invoices as we want to ensure that only a single hop hint is provided for a single private taproot assets channel (which overrides any other hop hints that may be defined).

This is not done for regular invoices though and should be so that we don't accidentally also issue route hints for channels and assets that we don't actually want to receive on.

I'm guessing we need to add

iReq.Private=false

after

// Otherwise, we'll make this into a normal invoice.

but I'm not a go programmer, so not sure of the exact syntax.

@Roasbeef
Copy link
Member

With the way Go works, default values are implicit. I set False above to call out that behavior explicitly to the reader.

Later on we made a follow up PR to fix a bug that was being masked by an incomplete feature: lightninglabs/lndclient#204.

The second section you posted uses the low level RPC API, which inherits the same default semantics. As a result, the Private field is already false.

@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Taproot-Assets Project Board Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
Status: ✅ Done
Development

No branches or pull requests

2 participants