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

Function param_command

lightningd/jsonrpc.c:1487–1502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

find_cmdFunction · 0.85
command_failFunction · 0.70

Tested by

no test coverage detected