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

Function json_add_jsonstr

common/json_stream.c:223–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221}
222
223void json_add_jsonstr(struct json_stream *js,
224 const char *fieldname,
225 const char *jsonstr,
226 size_t jsonstrlen)
227{
228 char *p;
229
230 /* NOTE: Filtering doesn't really work here! */
231 if (!json_filter_ok(js->filter, fieldname))
232 return;
233
234 p = json_member_direct(js, fieldname, jsonstrlen);
235 memcpy(p, jsonstr, jsonstrlen);
236}
237
238/* This is where we read the json_stream and write it to conn */
239static struct io_plan *json_stream_output_write(struct io_conn *conn,

Callers 9

json_add_indexFunction · 0.85
rpc_command_hook_finalFunction · 0.85
execute_commandFunction · 0.85
handle_replyFunction · 0.85
perform_fundpsbtFunction · 0.85
openchannel_finishedFunction · 0.85
start_mwFunction · 0.85

Calls 2

json_member_directFunction · 0.85
json_filter_okFunction · 0.70

Tested by

no test coverage detected