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

Function command_exec

lightningd/jsonrpc.c:767–788  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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