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

Function find_plugin_for_command

lightningd/plugin.c:1247–1262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1245}
1246
1247struct plugin *find_plugin_for_command(struct lightningd *ld,
1248 const char *cmd_name)
1249{
1250 struct plugins *plugins = ld->plugins;
1251 struct plugin *plugin;
1252
1253 /* Find the plugin that registered this RPC call */
1254 list_for_each(&plugins->plugins, plugin, list) {
1255 for (size_t i=0; i<tal_count(plugin->methods); i++) {
1256 if (streq(cmd_name, plugin->methods[i]))
1257 return plugin;
1258 }
1259 }
1260
1261 return NULL;
1262}
1263
1264static struct command_result *plugin_rpcmethod_check(struct command *cmd,
1265 const char *buffer,

Callers 6

json_checkmessageFunction · 0.70
plugin_rpcmethod_checkFunction · 0.70
plugin_rpcmethod_addFunction · 0.70
bitcoind_check_commandsFunction · 0.70
json_invoiceFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected