Skip to content

Conversation

@wqxoxo
Copy link
Contributor

@wqxoxo wqxoxo commented Nov 24, 2025

Fixes #8167

When p->route is NULL (no route found), the adaptive splitter
was still trying to split payments, causing thousands of attempts
all failing for the same reason.

Fixes: ElementsProject#8167
Changelog-Fixed: pay: no longer loops infinitely when CLTV budget exceeded
@rustyrussell rustyrussell added this to the v25.12 milestone Nov 25, 2025
@rustyrussell rustyrussell requested a review from cdecker November 25, 2025 01:52
@cdecker
Copy link
Member

cdecker commented Nov 25, 2025

Thanks for the attempt to fix this, however, I do not believe this is correct: generally speaking we split in two cases a) when we attempted this size for 10 times, and b) when we cannot find a route because the part is larger than the largest usable route.

Your fix removes the splitting on route-finding failure, which means a payment that needs to be split will fail, even if it could work perfectly fine. Take the following network for example:

A -- 1 --> B
|          |
1          99
|          |
v          v
C -- 9 --> D

For the payment A -> D for an amount of 1.1, we do not find a route, and your fix aborts right away. But there is a working path, if we split once: p1=0.55 going over A->B->D and p2=0.55 A->C->D, however having aborted earlier your change misses this opportunity. We can discuss whether an earlier abort is useful (I'd say yes), but the abort criteria you chose are too aggressive.

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.

pay: infinite pay loop

3 participants