| 74 | } |
| 75 | |
| 76 | static struct command_result *testrpc_cb(struct command *cmd, |
| 77 | const char *buf, |
| 78 | const jsmntok_t *params, |
| 79 | void *cb_arg UNUSED) |
| 80 | { |
| 81 | int i = 0; |
| 82 | const jsmntok_t *t; |
| 83 | struct json_stream *response; |
| 84 | |
| 85 | response = jsonrpc_stream_success(cmd); |
| 86 | json_for_each_obj(i, t, params) |
| 87 | json_add_tok(response, json_strdup(tmpctx, buf, t), t+1, buf); |
| 88 | |
| 89 | return command_finished(cmd, response); |
| 90 | } |
| 91 | |
| 92 | static struct command_result *json_testrpc(struct command *cmd, |
| 93 | const char *buf, |
nothing calls this directly
no test coverage detected