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

Function tell_waiter

lightningd/invoice.c:88–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88static struct command_result *tell_waiter(struct command *cmd,
89 const struct invoice *inv)
90{
91 struct json_stream *response;
92 const struct invoice_details *details;
93
94 details = wallet_invoice_details(cmd, cmd->ld->wallet, *inv);
95 if (details->state == PAID) {
96 response = json_stream_success(cmd);
97 json_add_invoice_fields(response, details);
98 return command_success(cmd, response);
99 } else {
100 response = json_stream_fail(cmd, INVOICE_EXPIRED_DURING_WAIT,
101 "invoice expired during wait");
102 json_add_invoice_fields(response, details);
103 json_object_end(response);
104 return command_failed(cmd, response);
105 }
106}
107
108static void tell_waiter_deleted(struct command *cmd)
109{

Callers 2

wait_on_invoiceFunction · 0.85
json_waitinvoiceFunction · 0.85

Calls 7

json_add_invoice_fieldsFunction · 0.85
json_stream_successFunction · 0.70
command_successFunction · 0.70
json_stream_failFunction · 0.70
command_failedFunction · 0.70
wallet_invoice_detailsFunction · 0.50
json_object_endFunction · 0.50

Tested by

no test coverage detected