From af6b535efd5eeb3fa69668736545ec91a9bc2ddb 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 32c2bea4a..2f369c990 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);