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

Function json_txdiscard

plugins/txprepare.c:466–488  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

464}
465
466static struct command_result *json_txdiscard(struct command *cmd,
467 const char *buffer,
468 const jsmntok_t *params)
469{
470 struct unreleased_tx *utx;
471 struct out_req *req;
472
473 if (!param(cmd, buffer, params,
474 p_req("txid", param_unreleased_txid, &utx),
475 NULL))
476 return command_param_failed();
477
478 /* Remove from list now, to avoid races! */
479 list_del_from(&unreleased_txs, &utx->list);
480 /* Whatever happens, we free it once this command is done. */
481 tal_steal(cmd, utx);
482
483 req = jsonrpc_request_start(cmd, "unreserveinputs",
484 unreserve_done, forward_error,
485 utx);
486 json_add_psbt(req->js, "psbt", utx->psbt);
487 return send_outreq(req);
488}
489
490static struct command_result *json_txsend(struct command *cmd,
491 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