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

Function plugin_hook_call_next

lightningd/plugin_hook.c:228–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226}
227
228static void plugin_hook_call_next(struct plugin_hook_request *ph_req)
229{
230 struct jsonrpc_request *req;
231 const struct plugin_hook *hook = ph_req->hook;
232 assert(!list_empty(&ph_req->call_chain));
233 ph_req->plugin = list_top(&ph_req->call_chain, struct plugin_hook_call_link, list)->plugin;
234
235 log_debug(ph_req->ld->log, "Calling %s hook of plugin %s",
236 ph_req->hook->name, ph_req->plugin->shortname);
237 req = jsonrpc_request_start(NULL, hook->name, ph_req->cmd_id,
238 plugin_get_log(ph_req->plugin),
239 NULL,
240 plugin_hook_callback, ph_req);
241
242 hook->serialize_payload(ph_req->cb_arg, req->stream, ph_req->plugin);
243 jsonrpc_request_end(req);
244 plugin_request_send(ph_req->plugin, req);
245}
246
247bool plugin_hook_call_(struct lightningd *ld, const struct plugin_hook *hook,
248 const char *cmd_id TAKES,

Callers 2

plugin_hook_callbackFunction · 0.85
plugin_hook_call_Function · 0.85

Calls 3

plugin_get_logFunction · 0.85
jsonrpc_request_endFunction · 0.70
plugin_request_sendFunction · 0.70

Tested by

no test coverage detected