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

Function json_txdiscard

plugins/txprepare.c:451–473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

449}
450
451static struct command_result *json_txdiscard(struct command *cmd,
452 const char *buffer,
453 const jsmntok_t *params)
454{
455 struct unreleased_tx *utx;
456 struct out_req *req;
457
458 if (!param(cmd, buffer, params,
459 p_req("txid", param_unreleased_txid, &utx),
460 NULL))
461 return command_param_failed();
462
463 /* Remove from list now, to avoid races! */
464 list_del_from(&unreleased_txs, &utx->list);
465 /* Whatever happens, we free it once this command is done. */
466 tal_steal(cmd, utx);
467
468 req = jsonrpc_request_start(cmd->plugin, cmd, "unreserveinputs",
469 unreserve_done, forward_error,
470 utx);
471 json_add_psbt(req->js, "psbt", utx->psbt);
472 return send_outreq(cmd->plugin, req);
473}
474
475static struct command_result *json_txsend(struct command *cmd,
476 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