From 8bae3d15daed766a56e017397cdf0084da791155 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Sun, 13 Aug 2023 12:41:12 +0930 Subject: [PATCH] pay: still use channels for routehints even if peer says it's disabled. We have a report that LND said our (unannounced) channel was disabled, so we didn't use it for routehints. We're better off ignoring that in this case (if the peer is actually not connected, the routehint code will check that and ignore anyway). Fixes: #6555 Signed-off-by: Rusty Russell Changelog-Changed: pay: use channels in routehints even if peer says they're "disabled" (LND compat) --- plugins/topology.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/topology.c b/plugins/topology.c index 32c2bea4a285..2f369c990f84 100644 --- a/plugins/topology.c +++ b/plugins/topology.c @@ -566,10 +566,12 @@ static struct command_result *json_listincoming(struct command *cmd, const u8 *peer_features; ourchan = gossmap_nth_chan(gossmap, me, i, &dir); - /* If its half is disabled, ignore. */ - if (!ourchan->half[!dir].enabled) + /* Entirely missing? Ignore. */ + if (ourchan->cupdate_off[!dir] == 0) continue; - + /* We used to ignore if the peer said it was disabled, + * but we have a report of LND telling us our unannounced + * channel is disabled, so we still use them. */ peer = gossmap_nth_node(gossmap, ourchan, !dir); scid = gossmap_chan_scid(gossmap, ourchan);