Skip to content

Commit

Permalink
offers: replace listincoming with listincoming2
Browse files Browse the repository at this point in the history
Also preserves the 'avoid a blinded path through private channel' logic
which was disrupted by adding node features regardless of public gossip.
  • Loading branch information
endothermicdev committed Jul 11, 2023
1 parent 4778d0f commit a2f2ce5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/offers_invreq_hook.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit a2f2ce5

Please sign in to comment.