| 133 | } |
| 134 | |
| 135 | static struct command_result *testrpc_cb(struct command *cmd, |
| 136 | const char *method UNUSED, |
| 137 | const char *buf, |
| 138 | const jsmntok_t *params, |
| 139 | void *cb_arg UNUSED) |
| 140 | { |
| 141 | int i = 0; |
| 142 | const jsmntok_t *t; |
| 143 | struct json_stream *response; |
| 144 | |
| 145 | response = jsonrpc_stream_success(cmd); |
| 146 | json_for_each_obj(i, t, params) |
| 147 | json_add_tok(response, json_strdup(tmpctx, buf, t), t+1, buf); |
| 148 | |
| 149 | return command_finished(cmd, response); |
| 150 | } |
| 151 | |
| 152 | static struct command_result *json_testrpc(struct command *cmd, |
| 153 | const char *buf, |
nothing calls this directly
no test coverage detected