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

Function find_best_peer_

plugins/offers.c:449–471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

447}
448
449struct command_result *find_best_peer_(struct command *cmd,
450 u64 needed_features,
451 const struct amount_msat *amount,
452 const struct pubkey *fronting_nodes,
453 struct command_result *(*cb)(struct command *,
454 const struct chaninfo *,
455 void *),
456 void *arg)
457{
458 struct out_req *req;
459 struct find_best_peer_data *data = tal(cmd, struct find_best_peer_data);
460 data->cb = cb;
461 data->arg = arg;
462 data->amount = tal_dup_or_null(data, struct amount_msat, amount);
463 data->needed_features = needed_features;
464 if (fronting_nodes)
465 data->fronting_nodes = tal_dup_talarr(data, struct pubkey, fronting_nodes);
466 else
467 data->fronting_nodes = NULL;
468 req = jsonrpc_request_start(cmd, "listincoming",
469 listincoming_done, forward_error, data);
470 return send_outreq(req);
471}
472
473static const struct plugin_hook hooks[] = {
474 {

Callers

nothing calls this directly

Calls 1

send_outreqFunction · 0.70

Tested by

no test coverage detected