MCPcopy Create free account
hub / github.com/ElementsProject/lightning / json_txprepare

Function json_txprepare

plugins/txprepare.c:406–425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

404}
405
406static struct command_result *json_txprepare(struct command *cmd,
407 const char *buffer,
408 const jsmntok_t *params)
409{
410 struct txprepare *txp = tal(cmd, struct txprepare);
411 const char *feerate;
412 struct bitcoin_outpoint *utxos;
413 unsigned int *minconf;
414
415 if (!param(cmd, buffer, params,
416 p_req("outputs", param_outputs, txp),
417 p_opt("feerate", param_string, &feerate),
418 p_opt_def("minconf", param_number, &minconf, 1),
419 p_opt("utxos", param_outpoint_arr, &utxos),
420 NULL))
421 return command_param_failed();
422
423 txp->is_upgrade = false;
424 return txprepare_continue(cmd, txp, feerate, minconf, utxos, false, false);
425}
426
427/* Called after we've unreserved the inputs. */
428static struct command_result *unreserve_done(struct command *cmd,

Callers

nothing calls this directly

Calls 3

txprepare_continueFunction · 0.85
command_param_failedFunction · 0.70
paramFunction · 0.50

Tested by

no test coverage detected