Skip to content

xpay: don't treat a full HTLC slot table as a capacity shortfall - #9621

Open
vincenzopalazzo wants to merge 1 commit into
ElementsProject:masterfrom
vincenzopalazzo:fix/issue-9597-too-many-htlcs
Open

vincenzopalazzo wants to merge 1 commit into
ElementsProject:masterfrom
vincenzopalazzo:fix/issue-9597-too-many-htlcs

Conversation

@vincenzopalazzo

Copy link
Copy Markdown
Collaborator

Summary

  • A local temporary_channel_failure whose message is Too many HTLCs does not depend on the amount. xpay still told askrene the channel was constrained, and askrene stored amount - 1 msat.
  • getroutes then kept the same channel as the cheapest hop, retried 1 msat smaller, and shed a dust part onto another channel. A slot shortage can never succeed that way. Fixes xpay treats a local "Too many HTLCs" failure as a 1 msat capacity shortfall and floods the route with dust parts. #9597.
  • A local slot failure now disables that channel for this payment. A remote temporary_channel_failure is unchanged: the onion does not say why, so it can still be a real capacity failure.

Test plan

  • test_xpay_local_too_many_htlcs_not_capacity: fill the forwarder's single slot, then xpay. One HTLC slots are full, disabling it for this payment, and no assuming it can't carry.
  • CI

channeld fails a local add with temporary_channel_failure ("Too many
HTLCs") no matter the amount. xpay told askrene the channel was
constrained, which stored amount-1msat, so getroutes retried the same
channel forever and shed dust parts.

A local slot failure now disables that channel for this payment.
Remote temporary_channel_failure is unchanged: the onion does not say
why.

Changelog-Fixed: xpay: a local "Too many HTLCs" failure no longer shrinks the channel by 1 msat and sheds dust parts on every retry.
Fixes ElementsProject#9597.
@vincenzopalazzo
vincenzopalazzo force-pushed the fix/issue-9597-too-many-htlcs branch from 6cba453 to 89c6835 Compare October 12, 2026 16:21

This branch has not been deployed

No deployments
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.

xpay treats a local "Too many HTLCs" failure as a 1 msat capacity shortfall and floods the route with dust parts.

1 participant