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

Function testrpc_cb

tests/plugins/test_libplugin.c:135–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135static 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
152static struct command_result *json_testrpc(struct command *cmd,
153 const char *buf,

Callers

nothing calls this directly

Calls 4

json_add_tokFunction · 0.85
jsonrpc_stream_successFunction · 0.50
json_strdupFunction · 0.50
command_finishedFunction · 0.50

Tested by

no test coverage detected