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

Function json_add_config_plugin

lightningd/plugin.c:1545–1560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1543}
1544
1545void json_add_config_plugin(struct json_stream *stream,
1546 const struct plugins *plugins,
1547 const char *fieldname,
1548 const struct opt_table *ot)
1549{
1550 struct plugin *plugin;
1551
1552 /* Shortcut */
1553 if (!is_plugin_opt(ot))
1554 return;
1555
1556 /* Find the plugin that registered this RPC call */
1557 plugin = plugin_opt_find_any(plugins, ot, NULL);
1558 if (plugin)
1559 json_add_string(stream, fieldname, plugin->cmd);
1560}
1561
1562/* Start command might have included plugin-specific parameters.
1563 * We make sure they *are* parameters for this plugin, then add them

Callers 1

json_add_configFunction · 0.85

Calls 3

is_plugin_optFunction · 0.85
plugin_opt_find_anyFunction · 0.85
json_add_stringFunction · 0.50

Tested by

no test coverage detected