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

Function timeout_sent_inv

plugins/fetchinvoice.c:649–663  ·  view source on GitHub ↗

We've received neither a reply nor a payment; return failure. */

Source from the content-addressed store, hash-verified

647
648/* We've received neither a reply nor a payment; return failure. */
649static struct command_result *timeout_sent_inv(struct command *timer_cmd,
650 struct sent *sent)
651{
652 struct json_out *details = json_out_new(sent);
653
654 json_out_start(details, NULL, '{');
655 json_out_addstr(details, "invstring", invoice_encode(tmpctx, sent->inv));
656 json_out_end(details, '}');
657
658 /* This will free sent! */
659 discard_result(command_done_err(sent->cmd, OFFER_TIMEOUT,
660 "Failed: timeout waiting for response",
661 details));
662 return timer_complete(timer_cmd);
663}
664
665static struct command_result *prepare_inv_timeout(struct command *cmd,
666 const char *method UNUSED,

Callers

nothing calls this directly

Calls 8

json_out_newFunction · 0.85
json_out_startFunction · 0.85
json_out_addstrFunction · 0.85
invoice_encodeFunction · 0.85
json_out_endFunction · 0.85
discard_resultFunction · 0.85
command_done_errFunction · 0.85
timer_completeFunction · 0.85

Tested by

no test coverage detected