Skip to content

renepay: skip channels disabled in gossmap#9134

Open
cdecker wants to merge 1 commit into
ElementsProject:masterfrom
cdecker:renepay-check-disabled-flag
Open

renepay: skip channels disabled in gossmap#9134
cdecker wants to merge 1 commit into
ElementsProject:masterfrom
cdecker:renepay-check-disabled-flag

Conversation

@cdecker
Copy link
Copy Markdown
Member

@cdecker cdecker commented May 14, 2026

Summary

  • channel_is_available() checked gossmap_chan_set() (channel_update exists) and renepay's own disabledmap bitmap, but never checked gossmap's half_chan.enabled flag
  • This caused renepay to route through channels marked as disabled in the gossip_store, wasting HTLC round-trips re-discovering the failure each time
  • Askrene already checks chan->half[dir].enabled in its equivalent code path

Changelog-Fixed: renepay now skips channels disabled in the gossip map.

Test plan

  • make plugins/cln-renepay builds cleanly
  • Existing renepay tests pass
  • Manual test: disable a channel via gossip, verify renepay skips it on first attempt

channel_is_available() checked whether a channel_update existed
(gossmap_chan_set) and whether renepay's own disabledmap had flagged
it, but never checked gossmap's half_chan.enabled flag.  This meant
renepay would route through channels marked disabled in the
gossip_store, wasting HTLC round-trips to re-discover the failure.

Changelog-Fixed: renepay now skips channels disabled in the gossip map.
@cdecker cdecker requested a review from Lagrang3 May 14, 2026 10:08
Copy link
Copy Markdown
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 should work as you have described.
askrene already checks if the channel is available.
Thanks.

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.

2 participants