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

Function param_command

lightningd/jsonrpc.c:1489–1504  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1487}
1488
1489static struct command_result *param_command(struct command *cmd,
1490 const char *name,
1491 const char *buffer,
1492 const jsmntok_t *tok,
1493 const jsmntok_t **out)
1494{
1495 cmd->json_cmd = find_cmd(cmd->jcon->ld->jsonrpc, buffer, tok);
1496 if (cmd->json_cmd) {
1497 *out = tok;
1498 return NULL;
1499 }
1500
1501 return command_fail(cmd, JSONRPC2_METHOD_NOT_FOUND,
1502 "Unknown command '%.*s'",
1503 tok->end - tok->start, buffer + tok->start);
1504}
1505
1506struct jsonrpc_notification *jsonrpc_notification_start_noparams(const tal_t *ctx, const char *method)
1507{

Callers

nothing calls this directly

Calls 2

find_cmdFunction · 0.85
command_failFunction · 0.70

Tested by

no test coverage detected