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

Function json_txsend

plugins/txprepare.c:490–513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

488}
489
490static 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
515static struct command_result *json_withdraw(struct command *cmd,
516 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