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

Function command_done_err

plugins/libplugin.c:401–417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

399}
400
401struct command_result *command_done_err(struct command *cmd,
402 enum jsonrpc_errcode code,
403 const char *errmsg,
404 const struct json_out *data)
405{
406 struct json_stream *js = jsonrpc_stream_start(cmd);
407
408 json_object_start(js, "error");
409 json_add_jsonrpc_errcode(js, "code", code);
410 json_add_string(js, "message", errmsg);
411
412 if (data)
413 json_out_add_splice(js->jout, "data", data);
414 json_object_end(js);
415
416 return command_complete(cmd, js);
417}
418
419struct command_result *command_err_raw(struct command *cmd,
420 const char *json_str)

Callers 9

command_err_bcli_badjsonFunction · 0.85
handle_errorFunction · 0.85
timeout_sent_invFunction · 0.85
connect_failedFunction · 0.85
try_other_parityFunction · 0.85
connect_directFunction · 0.85
command_failFunction · 0.85
handle_replyFunction · 0.85
json_funderupdateFunction · 0.85

Calls 7

jsonrpc_stream_startFunction · 0.85
json_add_jsonrpc_errcodeFunction · 0.85
json_out_add_spliceFunction · 0.85
command_completeFunction · 0.85
json_object_startFunction · 0.50
json_add_stringFunction · 0.50
json_object_endFunction · 0.50

Tested by

no test coverage detected