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

Function json_openchannel2_changed_call

plugins/funder.c:360–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

358}
359
360static struct command_result *
361json_openchannel2_changed_call(struct command *cmd,
362 const char *buf,
363 const jsmntok_t *params)
364{
365 struct channel_id cid;
366 struct wally_psbt *psbt;
367 const char *err;
368
369 err = json_scan(tmpctx, buf, params,
370 "{openchannel2_changed:"
371 "{channel_id:%,psbt:%}}",
372 JSON_SCAN(json_to_channel_id, &cid),
373 JSON_SCAN_TAL(cmd, json_to_psbt, &psbt));
374
375 if (err)
376 plugin_err(cmd->plugin,
377 "`openchannel2_changed` payload did not"
378 " scan %s: %.*s",
379 err, json_tok_full_len(params),
380 json_tok_full(buf, params));
381
382 plugin_log(cmd->plugin, LOG_DBG,
383 "openchannel_changed PSBT is %s",
384 fmt_wally_psbt(tmpctx, psbt));
385
386 /* FIXME: do we have any additions or updates to make based
387 * on their changes? */
388 /* For now, we assume we're the same as before and continue
389 * on as planned */
390 return command_hook_cont_psbt(cmd, psbt);
391}
392
393/* Tiny struct to pass info to callback for fundpsbt */
394struct open_info {

Callers

nothing calls this directly

Calls 7

fmt_wally_psbtFunction · 0.85
command_hook_cont_psbtFunction · 0.85
plugin_errFunction · 0.70
plugin_logFunction · 0.70
json_scanFunction · 0.50
json_tok_full_lenFunction · 0.50
json_tok_fullFunction · 0.50

Tested by

no test coverage detected