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

Function json_stream_raw_for_cmd

lightningd/jsonrpc.c:557–574  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

555}
556
557struct json_stream *json_stream_raw_for_cmd(struct command *cmd)
558{
559 struct json_stream *js;
560
561 /* Might have already opened it for a notification */
562 if (cmd->json_stream)
563 return cmd->json_stream;
564
565 /* If they still care about the result, attach it to them. */
566 if (cmd->jcon)
567 js = jcon_new_json_stream(cmd, cmd->jcon, cmd);
568 else
569 js = new_json_stream(cmd, cmd, NULL);
570
571 assert(!cmd->json_stream);
572 cmd->json_stream = js;
573 return js;
574}
575
576void json_stream_log_suppress_for_cmd(struct json_stream *js,
577 const struct command *cmd)

Callers 4

plugin_rpcmethod_cbFunction · 0.85
plugin_notify_cbFunction · 0.85
json_notify_fmtFunction · 0.85
json_startFunction · 0.85

Calls 2

jcon_new_json_streamFunction · 0.85
new_json_streamFunction · 0.85

Tested by

no test coverage detected