| 473 | } |
| 474 | |
| 475 | static struct command_result *json_txsend(struct command *cmd, |
| 476 | const char *buffer, |
| 477 | const jsmntok_t *params) |
| 478 | { |
| 479 | struct unreleased_tx *utx; |
| 480 | struct out_req *req; |
| 481 | |
| 482 | if (!param(cmd, buffer, params, |
| 483 | p_req("txid", param_unreleased_txid, &utx), |
| 484 | NULL)) |
| 485 | return command_param_failed(); |
| 486 | |
| 487 | /* Remove from list now, to avoid races! */ |
| 488 | list_del_from(&unreleased_txs, &utx->list); |
| 489 | /* If things go wrong, free it. */ |
| 490 | tal_steal(cmd, utx); |
| 491 | |
| 492 | req = jsonrpc_request_start(cmd->plugin, cmd, "signpsbt", |
| 493 | signpsbt_done, forward_error, |
| 494 | utx); |
| 495 | json_add_psbt(req->js, "psbt", utx->psbt); |
| 496 | return send_outreq(cmd->plugin, req); |
| 497 | } |
| 498 | |
| 499 | static struct command_result *json_withdraw(struct command *cmd, |
| 500 | const char *buffer, |
nothing calls this directly
no test coverage detected