MCPcopy Create free account
hub / github.com/ElementsProject/lightning / make_error

Function make_error

plugins/spender/splice.c:91–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91static 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
112static struct command_result *unreserve_get_result(struct command *cmd,
113 const char *methodname,

Callers 3

unreserve_get_resultFunction · 0.85
abort_get_resultFunction · 0.85
splice_signed_error_pkgFunction · 0.85

Calls 6

json_array_startFunction · 0.85
debug_log_to_jsonFunction · 0.85
json_array_endFunction · 0.85
tal_freeFunction · 0.85
jsonrpc_stream_failFunction · 0.50
command_finishedFunction · 0.50

Tested by

no test coverage detected