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

Function unreserve_psbt

plugins/funder.c:92–118  ·  view source on GitHub ↗

Frees open (eventually, in unreserve_done callback) */

Source from the content-addressed store, hash-verified

90
91/* Frees open (eventually, in unreserve_done callback) */
92static struct command_result *unreserve_psbt(struct command *cmd,
93 struct pending_open *open)
94{
95 struct out_req *req;
96 struct command *aux;
97
98 plugin_log(open->p, LOG_DBG,
99 "Calling `unreserveinputs` for channel %s",
100 fmt_channel_id(tmpctx,
101 &open->channel_id));
102
103 /* This can outlive the underlying cmd, so use an aux! */
104 aux = aux_command(cmd);
105 req = jsonrpc_request_start(aux,
106 "unreserveinputs",
107 unreserve_done, unreserve_done,
108 open);
109 json_add_psbt(req->js, "psbt", open->psbt);
110 send_outreq(req);
111
112 /* We will free this in callback, but remove from list *now*
113 * to avoid calling twice! */
114 list_del_from(&pending_opens, &open->list);
115 tal_steal(aux, open);
116
117 return command_still_pending(aux);
118}
119
120static void cleanup_peer_pending_opens(struct command *cmd,
121 const struct node_id *id)

Callers 2

json_channel_open_failedFunction · 0.85

Calls 7

json_add_psbtFunction · 0.85
list_del_fromFunction · 0.85
plugin_logFunction · 0.70
aux_commandFunction · 0.70
send_outreqFunction · 0.70
command_still_pendingFunction · 0.70
fmt_channel_idFunction · 0.50

Tested by

no test coverage detected