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

Function signpsbt_done

plugins/funder.c:254–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252}
253
254static struct command_result *
255signpsbt_done(struct command *cmd,
256 const char *method,
257 const char *buf,
258 const jsmntok_t *result,
259 struct pending_open *open)
260{
261 struct wally_psbt *signed_psbt;
262 struct command_result *res;
263 const char *err;
264
265 plugin_log(cmd->plugin, LOG_DBG,
266 "`signpsbt` done for channel %s",
267 fmt_channel_id(tmpctx,
268 &open->channel_id));
269 err = json_scan(tmpctx, buf, result,
270 "{signed_psbt:%}",
271 JSON_SCAN_TAL(cmd, json_to_psbt, &signed_psbt));
272
273 if (err)
274 plugin_err(cmd->plugin,
275 "`signpsbt` payload did not scan %s: %.*s",
276 err, json_tok_full_len(result),
277 json_tok_full(buf, result));
278
279 /* Save the list of utxos to the datastore! We'll need
280 * them again if we rbf */
281 res = remember_channel_utxos(cmd, open, signed_psbt);
282
283 /* The in-flight open is done, let's clean it up! */
284 list_del_from(&pending_opens, &open->list);
285 tal_free(open);
286
287 return res;
288}
289
290static struct command_result *
291json_openchannel2_sign_call(struct command *cmd,

Callers

nothing calls this directly

Calls 9

remember_channel_utxosFunction · 0.85
list_del_fromFunction · 0.85
tal_freeFunction · 0.85
plugin_logFunction · 0.70
plugin_errFunction · 0.70
fmt_channel_idFunction · 0.50
json_scanFunction · 0.50
json_tok_full_lenFunction · 0.50
json_tok_fullFunction · 0.50

Tested by

no test coverage detected