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

Function json_sendpay_in_progress

lightningd/pay.c:266–275  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

264
265/* We defer sendpay "success" until we know it's pending; consumes cmd */
266static struct command_result *
267json_sendpay_in_progress(struct command *cmd,
268 const struct wallet_payment *payment)
269{
270 struct json_stream *response = json_stream_success(cmd);
271 json_add_string(response, "message",
272 "Monitor status with listpays or waitsendpay");
273 json_add_payment_fields(response, payment);
274 return command_success(cmd, response);
275}
276
277static void tell_waiters_failed(struct lightningd *ld,
278 const struct sha256 *payment_hash,

Callers 2

payment_storeFunction · 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