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

Function json_start

lightningd/jsonrpc.c:586–597  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

584}
585
586static struct json_stream *json_start(struct command *cmd)
587{
588 struct json_stream *js = json_stream_raw_for_cmd(cmd);
589
590 json_object_start(js, NULL);
591 json_add_string(js, "jsonrpc", "2.0");
592 if (cmd->id_is_string)
593 json_add_string(js, "id", cmd->id);
594 else
595 json_add_jsonstr(js, "id", cmd->id, strlen(cmd->id));
596 return js;
597}
598
599struct json_stream *json_stream_success(struct command *cmd)
600{

Callers 3

json_stream_successFunction · 0.85
json_stream_fail_nodataFunction · 0.85
rpc_command_hook_finalFunction · 0.85

Calls 4

json_stream_raw_for_cmdFunction · 0.85
json_add_jsonstrFunction · 0.85
json_object_startFunction · 0.50
json_add_stringFunction · 0.50

Tested by

no test coverage detected