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

Function json_txsend

plugins/txprepare.c:475–497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

473}
474
475static 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
499static struct command_result *json_withdraw(struct command *cmd,
500 const char *buffer,

Callers

nothing calls this directly

Calls 5

list_del_fromFunction · 0.85
json_add_psbtFunction · 0.85
command_param_failedFunction · 0.70
send_outreqFunction · 0.70
paramFunction · 0.50

Tested by

no test coverage detected