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

Function testrpc_cb

tests/plugins/test_libplugin.c:76–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76static 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
92static struct command_result *json_testrpc(struct command *cmd,
93 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