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

Function unreserve_psbt

plugins/funder.c:93–113  ·  view source on GitHub ↗

Frees open (eventually, in unreserve_done callback) */

Source from the content-addressed store, hash-verified

91
92/* Frees open (eventually, in unreserve_done callback) */
93static void unreserve_psbt(struct pending_open *open)
94{
95 struct out_req *req;
96
97 plugin_log(open->p, LOG_DBG,
98 "Calling `unreserveinputs` for channel %s",
99 type_to_string(tmpctx, struct channel_id,
100 &open->channel_id));
101
102 req = jsonrpc_request_start(open->p, NULL,
103 "unreserveinputs",
104 unreserve_done, unreserve_done,
105 open);
106 json_add_psbt(req->js, "psbt", open->psbt);
107 send_outreq(open->p, req);
108
109 /* We will free this in callback, but remove from list *now*
110 * to avoid calling twice! */
111 list_del_from(&pending_opens, &open->list);
112 notleak(open);
113}
114
115static void cleanup_peer_pending_opens(const struct node_id *id)
116{

Callers 2

json_channel_open_failedFunction · 0.85

Calls 5

json_add_psbtFunction · 0.85
list_del_fromFunction · 0.85
plugin_logFunction · 0.70
send_outreqFunction · 0.70
type_to_stringClass · 0.50

Tested by

no test coverage detected