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

xpay below minimum htlc amount should not give up #8057

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rustyrussell
Copy link
Contributor

Excellent bug report, simple fix.

In particular, if the total amount we're sending is less than the minimum amount
the channel insists on, we can eliminate it.

This fixes the problem that we're really trying to send a de-minumus
amount (rather than the more obscure case where we divide the amount
and then it is below the minimum).

After trying several other approaches, this was by far the cleanest!

Reported-by: https://github.com/JssDWt
Fixes: ElementsProject#8045
Changelog-Fixed: xpay: don't simply give up if our total amount is less than htlc_minimum_msat on some channel.
Signed-off-by: Rusty Russell <[email protected]>
@rustyrussell rustyrussell added this to the v25.02 milestone Feb 6, 2025
Copy link
Collaborator

@Lagrang3 Lagrang3 left a comment

Choose a reason for hiding this comment

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

This a good quick fix on askrene side.

@endothermicdev
Copy link
Collaborator

I like the fix, but this causes a broken message when explaining the route failure while running tests/test_askrene.py::test_min_htlc_after_excess. That test may also need updating.
**BROKEN** plugin-cln-askrene: \"-c:getroutes#4/cln:getroutes#109\": Actually, I'm not sure why we didn't find the obvious route 0x1x0: perhaps this is a bug?

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.

3 participants