| 134 | } |
| 135 | |
| 136 | static struct command_result * |
| 137 | signpsbt_done(struct command *cmd, |
| 138 | const char *buf, |
| 139 | const jsmntok_t *result, |
| 140 | struct pending_open *open) |
| 141 | { |
| 142 | struct wally_psbt *signed_psbt; |
| 143 | const char *err; |
| 144 | |
| 145 | plugin_log(cmd->plugin, LOG_DBG, |
| 146 | "`signpsbt` done for channel %s", |
| 147 | type_to_string(tmpctx, struct channel_id, |
| 148 | &open->channel_id)); |
| 149 | err = json_scan(tmpctx, buf, result, |
| 150 | "{signed_psbt:%}", |
| 151 | JSON_SCAN_TAL(cmd, json_to_psbt, &signed_psbt)); |
| 152 | |
| 153 | if (err) |
| 154 | plugin_err(cmd->plugin, |
| 155 | "`signpsbt` payload did not scan %s: %*.s", |
| 156 | err, json_tok_full_len(result), |
| 157 | json_tok_full(buf, result)); |
| 158 | |
| 159 | /* This finishes the open (successfully!) */ |
| 160 | list_del_from(&pending_opens, &open->list); |
| 161 | tal_free(open); |
| 162 | |
| 163 | return command_hook_cont_psbt(cmd, signed_psbt); |
| 164 | } |
| 165 | |
| 166 | static struct command_result * |
| 167 | json_openchannel2_sign_call(struct command *cmd, |
nothing calls this directly
no test coverage detected