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

Function signpsbt_done

plugins/funder.c:248–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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