| 234 | } |
| 235 | |
| 236 | static struct command_result * |
| 237 | json_openchannel2_changed_call(struct command *cmd, |
| 238 | const char *buf, |
| 239 | const jsmntok_t *params) |
| 240 | { |
| 241 | struct channel_id cid; |
| 242 | struct wally_psbt *psbt; |
| 243 | const char *err; |
| 244 | |
| 245 | err = json_scan(tmpctx, buf, params, |
| 246 | "{openchannel2_changed:" |
| 247 | "{channel_id:%,psbt:%}}", |
| 248 | JSON_SCAN(json_to_channel_id, &cid), |
| 249 | JSON_SCAN_TAL(cmd, json_to_psbt, &psbt)); |
| 250 | |
| 251 | if (err) |
| 252 | plugin_err(cmd->plugin, |
| 253 | "`openchannel2_changed` payload did not" |
| 254 | " scan %s: %.*s", |
| 255 | err, json_tok_full_len(params), |
| 256 | json_tok_full(buf, params)); |
| 257 | |
| 258 | plugin_log(cmd->plugin, LOG_DBG, |
| 259 | "openchannel_changed PSBT is %s", |
| 260 | type_to_string(tmpctx, struct wally_psbt, psbt)); |
| 261 | |
| 262 | /* FIXME: do we have any additions or updates to make based |
| 263 | * on their changes? */ |
| 264 | /* For now, we assume we're the same as before and continue |
| 265 | * on as planned */ |
| 266 | return command_hook_cont_psbt(cmd, psbt); |
| 267 | } |
| 268 | |
| 269 | /* Tiny struct to pass info to callback for fundpsbt */ |
| 270 | struct open_info { |
nothing calls this directly
no test coverage detected