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

Function setup_command_usage

plugins/libplugin.c:1761–1776  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1759}
1760
1761static void setup_command_usage(struct plugin *p)
1762{
1763 struct command *usage_cmd = new_command(tmpctx, p, "usage",
1764 "check-usage",
1765 COMMAND_TYPE_USAGE_ONLY);
1766
1767 /* This is how common/param can tell it's just a usage request */
1768 for (size_t i = 0; i < p->num_commands; i++) {
1769 struct command_result *res;
1770
1771 usage_cmd->methodname = p->commands[i].name;
1772 res = p->commands[i].handle(usage_cmd, NULL, NULL);
1773 assert(res == &complete);
1774 assert(strmap_get(&p->usagemap, p->commands[i].name));
1775 }
1776}
1777
1778static void call_plugin_timer(struct plugin *p, struct timer *timer)
1779{

Callers 1

plugin_mainFunction · 0.70

Calls 2

new_commandFunction · 0.85
handleMethod · 0.45

Tested by

no test coverage detected