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

Function param_command

lightningd/jsonrpc.c:1491–1507  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1489}
1490
1491static struct command_result *param_command(struct command *cmd,
1492 const char *name,
1493 const char *buffer,
1494 const jsmntok_t *tok,
1495 const jsmntok_t **out)
1496{
1497 /* Not cmd->jcon: they may have hung up while a hook held us. */
1498 cmd->json_cmd = find_cmd(cmd->ld->jsonrpc, buffer, tok);
1499 if (cmd->json_cmd) {
1500 *out = tok;
1501 return NULL;
1502 }
1503
1504 return command_fail(cmd, JSONRPC2_METHOD_NOT_FOUND,
1505 "Unknown command '%.*s'",
1506 tok->end - tok->start, buffer + tok->start);
1507}
1508
1509struct jsonrpc_notification *jsonrpc_notification_start_noparams(const tal_t *ctx, const char *method)
1510{

Callers

nothing calls this directly

Calls 2

find_cmdFunction · 0.85
command_failFunction · 0.70

Tested by

no test coverage detected