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

Function param_command

lightningd/jsonrpc.c:1309–1324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1307}
1308
1309static struct command_result *param_command(struct command *cmd,
1310 const char *name,
1311 const char *buffer,
1312 const jsmntok_t *tok,
1313 const jsmntok_t **out)
1314{
1315 cmd->json_cmd = find_cmd(cmd->jcon->ld->jsonrpc, buffer, tok);
1316 if (cmd->json_cmd) {
1317 *out = tok;
1318 return NULL;
1319 }
1320
1321 return command_fail(cmd, JSONRPC2_METHOD_NOT_FOUND,
1322 "Unknown command '%.*s'",
1323 tok->end - tok->start, buffer + tok->start);
1324}
1325
1326struct jsonrpc_notification *jsonrpc_notification_start(const tal_t *ctx, const char *method)
1327{

Callers

nothing calls this directly

Calls 2

find_cmdFunction · 0.85
command_failFunction · 0.70

Tested by

no test coverage detected