From e5c4045b04cbbf764f4395bb31110b89fd50ee5e Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Thu, 14 May 2026 11:56:32 +0200 Subject: [PATCH] renepay: skip channels disabled in gossmap 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. --- plugins/renepay/mcf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/renepay/mcf.c b/plugins/renepay/mcf.c index 8fdd067b4e24..51851b97bb47 100644 --- a/plugins/renepay/mcf.c +++ b/plugins/renepay/mcf.c @@ -449,6 +449,8 @@ static bool channel_is_available(const struct gossmap_chan *c, int dir, { if (!gossmap_chan_set(c, dir)) return false; + if (!c->half[dir].enabled) + return false; const u32 chan_idx = gossmap_chan_idx(gossmap, c); return !bitmap_test_bit(disabled, chan_idx * 2 + dir);