| 1288 | } |
| 1289 | |
| 1290 | static 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 | |
| 1315 | struct event_info { |
| 1316 | struct chain_event *ev; |
no test coverage detected