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

Function find_plugin_for_command

lightningd/plugin.c:1104–1119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1102}
1103
1104struct plugin *find_plugin_for_command(struct lightningd *ld,
1105 const char *cmd_name)
1106{
1107 struct plugins *plugins = ld->plugins;
1108 struct plugin *plugin;
1109
1110 /* Find the plugin that registered this RPC call */
1111 list_for_each(&plugins->plugins, plugin, list) {
1112 for (size_t i=0; i<tal_count(plugin->methods); i++) {
1113 if (streq(cmd_name, plugin->methods[i]))
1114 return plugin;
1115 }
1116 }
1117
1118 return NULL;
1119}
1120
1121static struct command_result *plugin_rpcmethod_dispatch(struct command *cmd,
1122 const char *buffer,

Callers 5

json_checkmessageFunction · 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