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

Function plugin_rpcmethod_cb

lightningd/plugin.c:1060–1076  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1058}
1059
1060static void plugin_rpcmethod_cb(const char *buffer,
1061 const jsmntok_t *toks,
1062 const jsmntok_t *idtok,
1063 struct plugin_rpccall *call)
1064{
1065 struct command *cmd = call->cmd;
1066 struct json_stream *response;
1067
1068 response = json_stream_raw_for_cmd(cmd);
1069 json_stream_forward_change_id(response, buffer, toks, idtok, cmd->id,
1070 cmd->id_is_string);
1071 json_stream_double_cr(response);
1072 command_raw_complete(cmd, response);
1073
1074 list_del(&call->list);
1075 tal_free(call);
1076}
1077
1078static void plugin_notify_cb(const char *buffer,
1079 const jsmntok_t *methodtok,

Callers

nothing calls this directly

Calls 5

json_stream_raw_for_cmdFunction · 0.85
json_stream_double_crFunction · 0.85
command_raw_completeFunction · 0.85
tal_freeFunction · 0.85

Tested by

no test coverage detected