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

Function json_checkthis

tests/plugins/test_libplugin.c:179–200  ·  view source on GitHub ↗

A command which does async, even if it is a check */

Source from the content-addressed store, hash-verified

177
178/* A command which does async, even if it is a check */
179static struct command_result *json_checkthis(struct command *cmd,
180 const char *buf,
181 const jsmntok_t *params)
182{
183 struct out_req *req;
184 const jsmntok_t *key;
185
186 /* We are deliberately MORE restrictive than datastore, so we can
187 * fail here if we want to */
188 if (!param_check(cmd, buf, params,
189 p_opt("key", param_array, &key),
190 NULL))
191 return command_param_failed();
192
193 req = jsonrpc_request_start(cmd,
194 "listdatastore",
195 listdatastore_ok,
196 forward_error, NULL);
197 if (key)
198 json_add_tok(req->js, "key", key, buf);
199 return send_outreq(req);
200}
201
202static struct command_result *spam_done(struct command *cmd, void *unused)
203{

Callers

nothing calls this directly

Calls 4

param_checkFunction · 0.85
json_add_tokFunction · 0.85
command_param_failedFunction · 0.50
send_outreqFunction · 0.50

Tested by

no test coverage detected