| 464 | } |
| 465 | |
| 466 | static struct command_result *json_txdiscard(struct command *cmd, |
| 467 | const char *buffer, |
| 468 | const jsmntok_t *params) |
| 469 | { |
| 470 | struct unreleased_tx *utx; |
| 471 | struct out_req *req; |
| 472 | |
| 473 | if (!param(cmd, buffer, params, |
| 474 | p_req("txid", param_unreleased_txid, &utx), |
| 475 | NULL)) |
| 476 | return command_param_failed(); |
| 477 | |
| 478 | /* Remove from list now, to avoid races! */ |
| 479 | list_del_from(&unreleased_txs, &utx->list); |
| 480 | /* Whatever happens, we free it once this command is done. */ |
| 481 | tal_steal(cmd, utx); |
| 482 | |
| 483 | req = jsonrpc_request_start(cmd, "unreserveinputs", |
| 484 | unreserve_done, forward_error, |
| 485 | utx); |
| 486 | json_add_psbt(req->js, "psbt", utx->psbt); |
| 487 | return send_outreq(req); |
| 488 | } |
| 489 | |
| 490 | static struct command_result *json_txsend(struct command *cmd, |
| 491 | const char *buffer, |
nothing calls this directly
no test coverage detected