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

Function sendpay_fail

lightningd/pay.c:271–291  ·  view source on GitHub ↗

onionreply used if pay_errcode == PAY_UNPARSEABLE_ONION */

Source from the content-addressed store, hash-verified

269
270/* onionreply used if pay_errcode == PAY_UNPARSEABLE_ONION */
271static struct command_result *
272sendpay_fail(struct command *cmd,
273 const struct wallet_payment *payment,
274 enum jsonrpc_errcode pay_errcode,
275 const struct onionreply *onionreply,
276 const struct routing_failure *fail,
277 const char *errmsg,
278 void *unused)
279{
280 struct json_stream *data;
281
282 data = json_stream_fail(cmd, pay_errcode,
283 errmsg);
284 json_sendpay_fail_fields(data,
285 payment,
286 pay_errcode,
287 onionreply,
288 fail);
289 json_object_end(data);
290 return command_failed(cmd, data);
291}
292
293/* We defer sendpay "success" until we know it's pending; consumes cmd */
294static struct command_result *

Callers 3

wait_paymentFunction · 0.85
send_payment_coreFunction · 0.85
self_paymentFunction · 0.85

Calls 4

json_sendpay_fail_fieldsFunction · 0.85
json_object_endFunction · 0.85
json_stream_failFunction · 0.70
command_failedFunction · 0.70

Tested by

no test coverage detected