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

Function find_cmd

lightningd/jsonrpc.c:423–433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421}
422
423static const struct json_command *find_cmd(const struct jsonrpc *rpc,
424 const char *buffer,
425 const jsmntok_t *tok)
426{
427 struct json_command **commands = rpc->commands;
428
429 for (size_t i = 0; i < tal_count(commands); i++)
430 if (json_tok_streq(buffer, tok, commands[i]->name))
431 return commands[i];
432 return NULL;
433}
434
435/* This can be called directly on shutdown, even with unfinished cmd */
436static void destroy_command(struct command *cmd)

Callers 3

replace_commandFunction · 0.85
parse_requestFunction · 0.85
param_commandFunction · 0.85

Calls 1

json_tok_streqFunction · 0.50

Tested by

no test coverage detected