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

Function json_openchannel2_changed_call

plugins/funder.c:354–385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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