plugins/pay: revert 899a2e64b02d47fc3aa68d70b9f483c2e8d7d685, use routehints in order. - #3866
Closed
rustyrussell wants to merge 2 commits into
Closed
plugins/pay: revert 899a2e64b02d47fc3aa68d70b9f483c2e8d7d685, use routehints in order.#3866rustyrussell wants to merge 2 commits into
rustyrussell wants to merge 2 commits into
Conversation
This uses @cdecker's idea of excluding the routehinted channel from the route, and also consumes the route hints as it goes so that it makes progress. I don't know if this is correct, but it reliably passes tests/test_pay.py::test_tlv_or_legacy now. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Member
|
Hm, agreed that we need to remove the randomness, however by removing the routehints from the array we're forgetting them forever, including after the split, where they might start working again. I think I have a better idea:
This saves us from destroying the routehint array as we run through, save allocations and memory since the array is immutable and can be reused, and we neatly add the "can attempt directly" case into the routehint selection. I'll write this up and see which one performs better. |
Member
|
Strange, I also noticed that the PR is mostly empty now, since the second commit reverts almost all changes of the first. I split out the overrun issue into #3869 since that needs to be fixed asap. |
This file contains hidden or 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
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.
This uses @cdecker's idea of excluding the routehinted channel from the route,
and also consumes the route hints as it goes so that it makes progress.
I don't know if this is correct, but it reliably passes tests/test_pay.py::test_tlv_or_legacy
now.
Signed-off-by: Rusty Russell rusty@rustcorp.com.au