Repository navigation
xpay: don't treat a full HTLC slot table as a capacity shortfall - #9621
Open
vincenzopalazzo wants to merge 1 commit into
Open
vincenzopalazzo wants to merge 1 commit into
vincenzopalazzo wants to merge 1 commit into
Conversation
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
force-pushed
the
fix/issue-9597-too-many-htlcs
branch
from
October 12, 2026 16:21
6cba453 to
89c6835
Compare
This branch has not been deployed
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.
Summary
temporary_channel_failurewhose message isToo many HTLCsdoes not depend on the amount.xpaystill told askrene the channel wasconstrained, and askrene stored amount - 1 msat.getroutesthen 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.temporary_channel_failureis 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, thenxpay. OneHTLC slots are full, disabling it for this payment, and noassuming it can't carry.