| 1018 | } |
| 1019 | |
| 1020 | struct command_result *jsonrpc_get_datastore_(struct command *cmd, |
| 1021 | const char **keys, |
| 1022 | struct command_result *(*string_cb)(struct command *command, |
| 1023 | const char *val, |
| 1024 | void *arg), |
| 1025 | struct command_result *(*binary_cb)(struct command *command, |
| 1026 | const u8 *val, |
| 1027 | void *arg), |
| 1028 | void *arg) |
| 1029 | { |
| 1030 | struct out_req *req; |
| 1031 | struct get_ds_info *dsi = tal(NULL, struct get_ds_info); |
| 1032 | |
| 1033 | dsi->string_cb = string_cb; |
| 1034 | dsi->binary_cb = binary_cb; |
| 1035 | dsi->arg = arg; |
| 1036 | |
| 1037 | /* listdatastore doesn't fail (except API misuse) */ |
| 1038 | req = jsonrpc_request_start(cmd, "listdatastore", |
| 1039 | listdatastore_done, plugin_broken_cb, dsi); |
| 1040 | tal_steal(req, dsi); |
| 1041 | |
| 1042 | json_add_keypath(req->js->jout, "key", keys); |
| 1043 | return send_outreq(req); |
| 1044 | } |
| 1045 | |
| 1046 | static void destroy_cmd_mark_freed(struct command *cmd, bool *cmd_freed) |
| 1047 | { |
nothing calls this directly
no test coverage detected