| 449 | } |
| 450 | |
| 451 | static struct command_result *json_txdiscard(struct command *cmd, |
| 452 | const char *buffer, |
| 453 | const jsmntok_t *params) |
| 454 | { |
| 455 | struct unreleased_tx *utx; |
| 456 | struct out_req *req; |
| 457 | |
| 458 | if (!param(cmd, buffer, params, |
| 459 | p_req("txid", param_unreleased_txid, &utx), |
| 460 | NULL)) |
| 461 | return command_param_failed(); |
| 462 | |
| 463 | /* Remove from list now, to avoid races! */ |
| 464 | list_del_from(&unreleased_txs, &utx->list); |
| 465 | /* Whatever happens, we free it once this command is done. */ |
| 466 | tal_steal(cmd, utx); |
| 467 | |
| 468 | req = jsonrpc_request_start(cmd->plugin, cmd, "unreserveinputs", |
| 469 | unreserve_done, forward_error, |
| 470 | utx); |
| 471 | json_add_psbt(req->js, "psbt", utx->psbt); |
| 472 | return send_outreq(cmd->plugin, req); |
| 473 | } |
| 474 | |
| 475 | static struct command_result *json_txsend(struct command *cmd, |
| 476 | const char *buffer, |
nothing calls this directly
no test coverage detected