| 246 | } |
| 247 | |
| 248 | static struct command_result * |
| 249 | signpsbt_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 | |
| 284 | static struct command_result * |
| 285 | json_openchannel2_sign_call(struct command *cmd, |
nothing calls this directly
no test coverage detected