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

Function lookup_invoice_desc

plugins/bkpr/bookkeeper.c:1290–1313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1288}
1289
1290static struct command_result *lookup_invoice_desc(struct command *cmd,
1291 struct amount_msat credit,
1292 struct sha256 *payment_hash STEALS)
1293{
1294 struct out_req *req;
1295
1296 /* Otherwise will go away when event is cleaned up */
1297 tal_steal(cmd, payment_hash);
1298 if (!amount_msat_zero(credit))
1299 req = jsonrpc_request_start(cmd->plugin, cmd,
1300 "listinvoices",
1301 listinvoice_done,
1302 log_error,
1303 payment_hash);
1304 else
1305 req = jsonrpc_request_start(cmd->plugin, cmd,
1306 "listsendpays",
1307 listsendpays_done,
1308 log_error,
1309 payment_hash);
1310
1311 json_add_sha256(req->js, "payment_hash", payment_hash);
1312 return send_outreq(cmd->plugin, req);
1313}
1314
1315struct event_info {
1316 struct chain_event *ev;

Callers 3

listpeers_doneFunction · 0.85
parse_and_log_chain_moveFunction · 0.85

Calls 3

amount_msat_zeroFunction · 0.85
json_add_sha256Function · 0.50
send_outreqFunction · 0.50

Tested by

no test coverage detected