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

Function jsonrpc_get_datastore_

plugins/libplugin.c:1010–1034  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1008}
1009
1010struct command_result *jsonrpc_get_datastore_(struct command *cmd,
1011 const char **keys,
1012 struct command_result *(*string_cb)(struct command *command,
1013 const char *val,
1014 void *arg),
1015 struct command_result *(*binary_cb)(struct command *command,
1016 const u8 *val,
1017 void *arg),
1018 void *arg)
1019{
1020 struct out_req *req;
1021 struct get_ds_info *dsi = tal(NULL, struct get_ds_info);
1022
1023 dsi->string_cb = string_cb;
1024 dsi->binary_cb = binary_cb;
1025 dsi->arg = arg;
1026
1027 /* listdatastore doesn't fail (except API misuse) */
1028 req = jsonrpc_request_start(cmd, "listdatastore",
1029 listdatastore_done, plugin_broken_cb, dsi);
1030 tal_steal(req, dsi);
1031
1032 json_add_keypath(req->js->jout, "key", keys);
1033 return send_outreq(req);
1034}
1035
1036static void destroy_cmd_mark_freed(struct command *cmd, bool *cmd_freed)
1037{

Callers

nothing calls this directly

Calls 2

json_add_keypathFunction · 0.85
send_outreqFunction · 0.70

Tested by

no test coverage detected