-
Notifications
You must be signed in to change notification settings - Fork 902
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 pay with multiple channels #5947
Merged
rustyrussell
merged 5 commits into
ElementsProject:master
from
rustyrussell:guilt/pay-via-zeroconf
Feb 2, 2023
Merged
Fix pay with multiple channels #5947
rustyrussell
merged 5 commits into
ElementsProject:master
from
rustyrussell:guilt/pay-via-zeroconf
Feb 2, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Modifications from issue ElementsProject#5803 to work here: 1. import json 2. Add xfail 3. Increase channel sizes by 10x so we can open them 4. Fix plugin path Signed-off-by: Rusty Russell <[email protected]>
We fixed most of them. Now hone in to the case which fails: `pay` when it needs to use the direct zero-conf channel. Signed-off-by: Rusty Russell <[email protected]>
…ains about. We assign this in the loop without freeing it first. ``` plugin-pay: MEMLEAK: 0x55792b155e18 plugin-pay: label=plugins/libplugin-pay.c:3274:struct short_channel_id_dir plugin-pay: backtrace: plugin-pay: ccan/ccan/tal/tal.c:442 (tal_alloc_) plugin-pay: plugins/libplugin-pay.c:3274 (direct_pay_listpeerchannels) plugin-pay: plugins/libplugin.c:860 (handle_rpc_reply) plugin-pay: plugins/libplugin.c:1036 (rpc_read_response_one) plugin-pay: plugins/libplugin.c:1060 (rpc_conn_read_response) plugin-pay: ccan/ccan/io/io.c:59 (next_plan) plugin-pay: ccan/ccan/io/io.c:407 (do_plan) plugin-pay: ccan/ccan/io/io.c:417 (io_ready) plugin-pay: ccan/ccan/io/poll.c:453 (io_loop) plugin-pay: plugins/libplugin.c:1893 (plugin_main) plugin-pay: plugins/pay.c:1294 (main) plugin-pay: ../sysdeps/nptl/libc_start_call_main.h:58 (__libc_start_call_main) plugin-pay: ../csu/libc-start.c:381 (__libc_start_main_impl) plugin-pay: parents: plugin-pay: plugins/libplugin-pay.c:3308:struct direct_pay_data plugin-pay: plugins/libplugin.c:1775:struct plugin ``` Signed-off-by: Rusty Russell <[email protected]>
If we only specify the node_id, we get the "first" channel. Closes: ElementsProject#5803 Signed-off-by: Rusty Russell <[email protected]> Changelog-Fixed: Plugins: `pay` uses the correct local channel for payments when there are multiple available (not just always the first!)
rustyrussell
force-pushed
the
guilt/pay-via-zeroconf
branch
from
February 2, 2023 01:49
b63d49e
to
54c6703
Compare
1. Allow 'any' as an option to zeroconf-selective.py plugin so we can use it in line_graph where we don't know ids yet. 2. Use modern helpers like line_graph and remove debugging statement. 3. Don't use listchannels(): it's true that it shows local channels as well, but that's a quirk I'd like to remove. 4. Make flake8 happy. 5. Rename to be more specific now it's a more narrow test. I manually tested that the test still failed with the fixes removed, too, so it is still the same test! Signed-off-by: Rusty Russell <[email protected]>
rustyrussell
force-pushed
the
guilt/pay-via-zeroconf
branch
from
February 2, 2023 02:26
54c6703
to
78b43ff
Compare
vincenzopalazzo
approved these changes
Feb 2, 2023
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.
ACK 78b43ff
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I ported @dongcarl 's test and found two bugs, one minor (temporary memleak), one major (pay didn't specify which channel to use, so we always used the first one with peer!).