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

Function command_exec

lightningd/jsonrpc.c:763–784  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

761}
762
763static struct command_result *command_exec(struct json_connection *jcon,
764 struct command *cmd,
765 const char *buffer,
766 const jsmntok_t *request,
767 const jsmntok_t *params)
768{
769 struct command_result *res;
770
771 res = cmd->json_cmd->dispatch(cmd, buffer, request, params);
772
773 assert(res == &param_failed
774 || res == &complete
775 || res == &pending
776 || res == &unknown);
777
778 /* If they didn't complete it, they must call command_still_pending.
779 * If they completed it, it's freed already. */
780 if (res == &pending)
781 assert(cmd->pending);
782
783 return res;
784}
785
786/* A plugin hook to take over (fail/alter) RPC commands */
787struct rpc_command_hook_payload {

Callers 2

replace_commandFunction · 0.85
rpc_command_hook_finalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected