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

Function payee_incoming_limit_step_cb

plugins/libplugin-pay.c:3863–3879  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3861}
3862
3863static struct command_result *payee_incoming_limit_step_cb(void *d UNUSED, struct payment *p)
3864{
3865 /* Only operate at the initialization of te root payment.
3866 * Also, no point operating if payment does not support MPP anyway.
3867 */
3868 if (p->parent || p->step != PAYMENT_STEP_INITIALIZED
3869 || !payment_supports_mpp(p))
3870 return payment_continue(p);
3871
3872 /* Get information on the destination. */
3873 struct out_req *req;
3874 req = jsonrpc_request_start(payment_cmd(p), "listchannels",
3875 &payee_incoming_limit_count,
3876 &payment_rpc_failure, p);
3877 json_add_node_id(req->js, "source", p->route_destination);
3878 return send_outreq(req);
3879}
3880
3881REGISTER_PAYMENT_MODIFIER(payee_incoming_limit, void *, NULL,
3882 payee_incoming_limit_step_cb);

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected