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

Function json_sendpay_in_progress

lightningd/pay.c:294–303  ·  view source on GitHub ↗

We defer sendpay "success" until we know it's pending; consumes cmd */

Source from the content-addressed store, hash-verified

292
293/* We defer sendpay "success" until we know it's pending; consumes cmd */
294static struct command_result *
295json_sendpay_in_progress(struct command *cmd,
296 const struct wallet_payment *payment)
297{
298 struct json_stream *response = json_stream_success(cmd);
299 json_add_string(response, "message",
300 "Monitor status with listpays or waitsendpay");
301 json_add_payment_fields(response, payment);
302 return command_success(cmd, response);
303}
304
305static void tell_waiters_failed(struct lightningd *ld,
306 const struct sha256 *payment_hash,

Callers 2

check_progressFunction · 0.85
send_payment_coreFunction · 0.85

Calls 4

json_add_payment_fieldsFunction · 0.85
json_stream_successFunction · 0.70
command_successFunction · 0.70
json_add_stringFunction · 0.50

Tested by

no test coverage detected