| 89 | } |
| 90 | |
| 91 | static struct command_result *make_error(struct command *cmd, |
| 92 | struct abort_pkg *abort_pkg, |
| 93 | const char *phase) |
| 94 | { |
| 95 | struct splice_cmd *splice_cmd = abort_pkg->splice_cmd; |
| 96 | char *str = abort_pkg->str; |
| 97 | struct json_stream *response = jsonrpc_stream_fail(cmd, |
| 98 | abort_pkg->code, |
| 99 | str ?: phase); |
| 100 | |
| 101 | if (splice_cmd->debug_log) { |
| 102 | json_array_start(response, "log"); |
| 103 | debug_log_to_json(response, splice_cmd->debug_log); |
| 104 | json_array_end(response); |
| 105 | } |
| 106 | |
| 107 | tal_free(abort_pkg); |
| 108 | |
| 109 | return command_finished(cmd, response); |
| 110 | } |
| 111 | |
| 112 | static struct command_result *unreserve_get_result(struct command *cmd, |
| 113 | const char *methodname, |
no test coverage detected