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

Check whether the recipient supports keysend #4236

Merged
merged 2 commits into from
Dec 11, 2020

Conversation

cdecker
Copy link
Member

@cdecker cdecker commented Nov 30, 2020

We weren't checking whether the recipient supports keysend or not before trying to pay. This could lead to rather unhelpful 16399 errors, because the recipient simply doesn't understand what we're trying to do.

This might be the cause for #3968, but I can't verify that that's the case.

Fixes #3968

@rustyrussell
Copy link
Contributor

Ack 9dc9a51

But you have to fix up tests which broke...

@cdecker cdecker force-pushed the keysend-check branch 2 times, most recently from 0c9bbd4 to 1ee3c64 Compare December 3, 2020 14:30
@cdecker
Copy link
Member Author

cdecker commented Dec 3, 2020

Rolled up the fixups. The remaining issue is unrelated (flaky test_fundchannel_start_alternate).

Ready to merge ^^

We were blindly initiating the keysend payment, which could lead to
confusing outcomes. This adds a very specific error message to the
error returned.

Changelog-Fixed: keysend: Keysend now checks whether the destination supports keysend before attempting a payment. If not a more informative error is returned.
Copy link
Contributor

@rustyrussell rustyrussell left a comment

Choose a reason for hiding this comment

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

OK, I'll rebase on master and drop first commit now we have get_gossmap()


/* A way for a plugin to interrogate the gossip map for things
* it needs to know. */
const struct gossmap *gossmap;
Copy link
Contributor

Choose a reason for hiding this comment

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

No, this looks like it predates get_gossmap() which returns this? That would explain why this doesn't compile, too.

Stashing it in the struct payment is really ugly, too...

@cdecker
Copy link
Member Author

cdecker commented Dec 11, 2020

ACK ac9f7dd

@cdecker cdecker merged commit 5a69b94 into ElementsProject:master Dec 11, 2020
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.

keysend only working with other c-lightning nodes
2 participants