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

Function sendinvoice_after_connect

plugins/fetchinvoice.c:1365–1377  ·  view source on GitHub ↗

We've connected (if we tried), so send the invoice. */

Source from the content-addressed store, hash-verified

1363
1364/* We've connected (if we tried), so send the invoice. */
1365static struct command_result *
1366sendinvoice_after_connect(struct command *cmd,
1367 const char *buf UNUSED,
1368 const jsmntok_t *result UNUSED,
1369 struct sent *sent)
1370{
1371 struct tlv_onionmsg_payload *payload = tlv_onionmsg_payload_new(sent);
1372
1373 payload->invoice = tal_arr(payload, u8, 0);
1374 towire_tlv_invoice(&payload->invoice, sent->inv);
1375
1376 return send_message(cmd, sent, payload, prepare_inv_timeout);
1377}
1378
1379static struct command_result *createinvoice_done(struct command *cmd,
1380 const char *buf,

Callers 1

createinvoice_doneFunction · 0.85

Calls 2

send_messageFunction · 0.85
towire_tlv_invoiceFunction · 0.50

Tested by

no test coverage detected