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

Function find_cmd

lightningd/jsonrpc.c:501–511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

499}
500
501static const struct json_command *find_cmd(const struct jsonrpc *rpc,
502 const char *buffer,
503 const jsmntok_t *tok)
504{
505 const struct cmd_and_usage *cmd;
506
507 cmd = strmap_getn(&rpc->cmdmap, buffer + tok->start, tok->end - tok->start);
508 if (cmd)
509 return cmd->command;
510 return NULL;
511}
512
513/* This can be called directly on shutdown, even with unfinished cmd */
514static void destroy_command(struct command *cmd)

Callers 3

replace_commandFunction · 0.85
parse_requestFunction · 0.85
param_commandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected