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

Function direct_pay_cb

plugins/libplugin-pay.c:3577–3591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3575}
3576
3577static struct command_result *direct_pay_cb(struct direct_pay_data *d, struct payment *p)
3578{
3579 struct out_req *req;
3580
3581/* Look up the direct channel only on root. */
3582 if (p->step != PAYMENT_STEP_INITIALIZED)
3583 return payment_continue(p);
3584
3585 req = jsonrpc_request_start(payment_cmd(p), "listpeerchannels",
3586 direct_pay_listpeerchannels,
3587 direct_pay_listpeerchannels,
3588 p);
3589 json_add_node_id(req->js, "id", p->route_destination);
3590 return send_outreq(req);
3591}
3592
3593static struct direct_pay_data *direct_pay_init(struct payment *p)
3594{

Callers

nothing calls this directly

Calls 4

payment_cmdFunction · 0.85
json_add_node_idFunction · 0.85
payment_continueFunction · 0.70
send_outreqFunction · 0.70

Tested by

no test coverage detected