| 488 | } |
| 489 | |
| 490 | static struct command_result *json_txsend(struct command *cmd, |
| 491 | const char *buffer, |
| 492 | const jsmntok_t *params) |
| 493 | { |
| 494 | struct unreleased_tx *utx; |
| 495 | struct out_req *req; |
| 496 | |
| 497 | if (!param(cmd, buffer, params, |
| 498 | p_req("txid", param_unreleased_txid, &utx), |
| 499 | NULL)) |
| 500 | return command_param_failed(); |
| 501 | |
| 502 | /* Remove from list now, to avoid races! */ |
| 503 | list_del_from(&unreleased_txs, &utx->list); |
| 504 | /* If things go wrong, free it. */ |
| 505 | tal_steal(cmd, utx); |
| 506 | |
| 507 | req = jsonrpc_request_start(cmd, "signpsbt", |
| 508 | signpsbt_done, |
| 509 | txprepare_forward_error, |
| 510 | utx); |
| 511 | json_add_psbt(req->js, "psbt", utx->psbt); |
| 512 | return send_outreq(req); |
| 513 | } |
| 514 | |
| 515 | static struct command_result *json_withdraw(struct command *cmd, |
| 516 | const char *buffer, |
nothing calls this directly
no test coverage detected