MCPcopy Create free account
hub / github.com/ElementsProject/lightning / add_blindedpaths

Function add_blindedpaths

plugins/offers_invreq_hook.c:396–411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

394}
395
396static struct command_result *add_blindedpaths(struct command *cmd,
397 struct invreq *ir)
398{
399 struct amount_msat amount = amount_msat(*ir->inv->invoice_amount);
400 if (!we_want_blinded_path(cmd->plugin, ir->fronting_nodes, true))
401 return create_invoicereq(cmd, ir);
402
403 /* Technically, this only needs OPT_ROUTE_BLINDING, but we have a report
404 * of this failing with LND nodes, so we require both OPT_ROUTE_BLINDING
405 * *and* OPT_ONION_MESSAGES. This also helps support nodes which provide
406 * us onion messaging. */
407 return find_best_peer(cmd,
408 (1ULL << OPT_ROUTE_BLINDING) | (1ULL << OPT_ONION_MESSAGES),
409 &amount,
410 ir->fronting_nodes, found_best_peer, ir);
411}
412
413static struct command_result *cancel_invoice(struct command *cmd,
414 struct invreq *ir)

Callers 2

check_periodFunction · 0.85

Calls 3

we_want_blinded_pathFunction · 0.85
create_invoicereqFunction · 0.85
amount_msatClass · 0.70

Tested by

no test coverage detected