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

Function jsonrpc_stream_fail

plugins/libplugin.c:261–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259}
260
261struct json_stream *jsonrpc_stream_fail(struct command *cmd,
262 int code,
263 const char *err)
264{
265 struct json_stream *js = jsonrpc_stream_start(cmd);
266
267 json_object_start(js, "error");
268 json_add_primitive_fmt(js, "code", "%d", code);
269 json_add_string(js, "message", err);
270
271 return js;
272}
273
274struct json_stream *jsonrpc_stream_fail_data(struct command *cmd,
275 int code,

Callers 3

on_payment_failureFunction · 0.70
payment_finishedFunction · 0.70
jsonrpc_stream_fail_dataFunction · 0.70

Calls 4

jsonrpc_stream_startFunction · 0.85
json_add_primitive_fmtFunction · 0.85
json_object_startFunction · 0.50
json_add_stringFunction · 0.50

Tested by

no test coverage detected