| 391 | } |
| 392 | |
| 393 | static struct command_result *json_txprepare(struct command *cmd, |
| 394 | const char *buffer, |
| 395 | const jsmntok_t *params) |
| 396 | { |
| 397 | struct txprepare *txp = tal(cmd, struct txprepare); |
| 398 | const char *feerate; |
| 399 | struct bitcoin_outpoint *utxos; |
| 400 | unsigned int *minconf; |
| 401 | |
| 402 | if (!param(cmd, buffer, params, |
| 403 | p_req("outputs", param_outputs, txp), |
| 404 | p_opt("feerate", param_string, &feerate), |
| 405 | p_opt_def("minconf", param_number, &minconf, 1), |
| 406 | p_opt("utxos", param_outpoint_arr, &utxos), |
| 407 | NULL)) |
| 408 | return command_param_failed(); |
| 409 | |
| 410 | return txprepare_continue(cmd, txp, feerate, minconf, utxos, false); |
| 411 | } |
| 412 | |
| 413 | /* Called after we've unreserved the inputs. */ |
| 414 | static struct command_result *unreserve_done(struct command *cmd, |
nothing calls this directly
no test coverage detected