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

Function createinvoice_error

plugins/offers_invreq_hook.c:192–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190}
191
192static struct command_result *createinvoice_error(struct command *cmd,
193 const char *buf,
194 const jsmntok_t *err,
195 struct invreq *ir)
196{
197 u32 code;
198
199 /* If it already exists, we can reuse its bolt12 directly. */
200 if (json_scan(tmpctx, buf, err,
201 "{code:%}", JSON_SCAN(json_to_u32, &code)) == NULL
202 && code == INVOICE_LABEL_ALREADY_EXISTS) {
203 return createinvoice_done(cmd, buf,
204 json_get_member(buf, err, "data"), ir);
205 }
206 return error(cmd, buf, err, ir);
207}
208
209static struct command_result *create_invoicereq(struct command *cmd,
210 struct invreq *ir)

Callers

nothing calls this directly

Calls 4

errorFunction · 0.85
createinvoice_doneFunction · 0.70
json_scanFunction · 0.50
json_get_memberFunction · 0.50

Tested by

no test coverage detected