| 352 | } |
| 353 | |
| 354 | static struct command_result * |
| 355 | json_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 */ |
| 388 | struct open_info { |
nothing calls this directly
no test coverage detected