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

Function txprepare_forward_error

plugins/txprepare.c:68–90  ·  view source on GitHub ↗

Immediate send flows must drop the original PSBT input reservation. */

Source from the content-addressed store, hash-verified

66
67/* Immediate send flows must drop the original PSBT input reservation. */
68static struct command_result *
69txprepare_forward_error(struct command *cmd,
70 const char *method,
71 const char *buf,
72 const jsmntok_t *error,
73 struct unreleased_tx *utx)
74{
75 struct out_req *req;
76 struct txprepare_cleanup *cleanup;
77
78 if (!utx->psbt)
79 return forward_error(cmd, method, buf, error, NULL);
80
81 cleanup = tal(cmd, struct txprepare_cleanup);
82 cleanup->error_json = json_strdup(cleanup, buf, error);
83
84 req = jsonrpc_request_start(cmd, "unreserveinputs",
85 txprepare_cleanup_done,
86 txprepare_cleanup_done,
87 cleanup);
88 json_add_psbt(req->js, "psbt", utx->psbt);
89 return send_outreq(req);
90}
91
92static struct command_result *param_outputs(struct command *cmd,
93 const char *name,

Callers

nothing calls this directly

Calls 4

json_add_psbtFunction · 0.85
forward_errorFunction · 0.70
send_outreqFunction · 0.70
json_strdupFunction · 0.50

Tested by

no test coverage detected