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

Function setup_command_usage

plugins/libplugin.c:1751–1766  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1749}
1750
1751static void setup_command_usage(struct plugin *p)
1752{
1753 struct command *usage_cmd = new_command(tmpctx, p, "usage",
1754 "check-usage",
1755 COMMAND_TYPE_USAGE_ONLY);
1756
1757 /* This is how common/param can tell it's just a usage request */
1758 for (size_t i = 0; i < p->num_commands; i++) {
1759 struct command_result *res;
1760
1761 usage_cmd->methodname = p->commands[i].name;
1762 res = p->commands[i].handle(usage_cmd, NULL, NULL);
1763 assert(res == &complete);
1764 assert(strmap_get(&p->usagemap, p->commands[i].name));
1765 }
1766}
1767
1768static void call_plugin_timer(struct plugin *p, struct timer *timer)
1769{

Callers 1

plugin_mainFunction · 0.70

Calls 2

new_commandFunction · 0.85
handleMethod · 0.45

Tested by

no test coverage detected