From a2f2ce5c882bf12c4cc2e6e7678ca600c457d85d Mon Sep 17 00:00:00 2001 From: Alex Myers Date: Tue, 11 Jul 2023 14:41:14 -0500 Subject: [PATCH] offers: replace listincoming with listincoming2 Also preserves the 'avoid a blinded path through private channel' logic which was disrupted by adding node features regardless of public gossip. --- plugins/offers_invreq_hook.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/offers_invreq_hook.c b/plugins/offers_invreq_hook.c index 1a52a3cdd1f7..d3a4d24233c6 100644 --- a/plugins/offers_invreq_hook.c +++ b/plugins/offers_invreq_hook.c @@ -314,7 +314,7 @@ static struct command_result *listincoming_done(struct command *cmd, * we could use listpeers, but if it's private we probably * don't want to blinded route through it! */ pftok = json_get_member(buf, t, "peer_features"); - if (!pftok) + if (!pftok || !ci.public) continue; features = json_tok_bin_from_hex(tmpctx, buf, pftok); if (!feature_offered(features, OPT_ROUTE_BLINDING)) @@ -422,7 +422,7 @@ static struct command_result *add_blindedpaths(struct command *cmd, { struct out_req *req; - req = jsonrpc_request_start(cmd->plugin, cmd, "listincoming", + req = jsonrpc_request_start(cmd->plugin, cmd, "listincoming2", listincoming_done, listincoming_done, ir); return send_outreq(cmd->plugin, req); }