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

Function json_add_keypath

plugins/libplugin.c:587–595  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

585}
586
587static void json_add_keypath(struct json_out *jout, const char *fieldname, const char *path)
588{
589 char **parts = tal_strsplit(tmpctx, path, "/", STR_EMPTY_OK);
590
591 json_out_start(jout, fieldname, '[');
592 for (size_t i = 0; parts[i]; parts++)
593 json_out_addstr(jout, NULL, parts[i]);
594 json_out_end(jout, ']');
595}
596
597static bool rpc_scan_datastore(struct plugin *plugin,
598 const char *path,

Callers 2

rpc_scan_datastoreFunction · 0.85
jsonrpc_set_datastore_Function · 0.85

Calls 3

json_out_startFunction · 0.85
json_out_addstrFunction · 0.85
json_out_endFunction · 0.85

Tested by

no test coverage detected