| 1160 | } |
| 1161 | |
| 1162 | static struct command_result *splice_signed_get_result(struct command *cmd, |
| 1163 | const char *methodname, |
| 1164 | const char *buf, |
| 1165 | const jsmntok_t *result, |
| 1166 | struct splice_index_pkg *pkg) |
| 1167 | { |
| 1168 | size_t index = pkg->index; |
| 1169 | struct splice_cmd *splice_cmd = pkg->splice_cmd; |
| 1170 | const jsmntok_t *tok; |
| 1171 | |
| 1172 | tal_free(pkg); |
| 1173 | |
| 1174 | tok = json_get_member(buf, result, "psbt"); |
| 1175 | tal_free(splice_cmd->psbt); |
| 1176 | splice_cmd->psbt = json_to_psbt(splice_cmd, buf, tok); |
| 1177 | |
| 1178 | tok = json_get_member(buf, result, "txid"); |
| 1179 | if (!json_to_txid(buf, tok, &splice_cmd->final_txid)) |
| 1180 | return command_fail_badparam(cmd, "txid", buf, |
| 1181 | tok, "invalid txid"); |
| 1182 | |
| 1183 | splice_cmd->states[index]->state = SPLICE_CMD_DONE; |
| 1184 | |
| 1185 | return continue_splice(splice_cmd->cmd, splice_cmd); |
| 1186 | } |
| 1187 | |
| 1188 | static struct command_result *splice_signed_error_pkg(struct command *cmd, |
| 1189 | const char *methodname, |
nothing calls this directly
no test coverage detected