| 90 | } |
| 91 | |
| 92 | static char *datastore_key_fmt(const tal_t *ctx, const char **key) |
| 93 | { |
| 94 | char *ret = tal_strdup(ctx, "["); |
| 95 | for (size_t i = 0; i < tal_count(key); i++) |
| 96 | tal_append_fmt(&ret, "%s%s", i ? "," : "", key[i]); |
| 97 | tal_append_fmt(&ret, "]"); |
| 98 | return ret; |
| 99 | } |
| 100 | |
| 101 | static struct command_result *json_datastore(struct command *cmd, |
| 102 | const char *buffer, |
no test coverage detected