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

Function setup_command_usage

plugins/libplugin.c:1191–1206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1189}
1190
1191static void setup_command_usage(struct plugin *p)
1192{
1193 struct command *usage_cmd = tal(tmpctx, struct command);
1194
1195 /* This is how common/param can tell it's just a usage request */
1196 usage_cmd->usage_only = true;
1197 usage_cmd->plugin = p;
1198 for (size_t i = 0; i < p->num_commands; i++) {
1199 struct command_result *res;
1200
1201 usage_cmd->methodname = p->commands[i].name;
1202 res = p->commands[i].handle(usage_cmd, NULL, NULL);
1203 assert(res == &complete);
1204 assert(strmap_get(&p->usagemap, p->commands[i].name));
1205 }
1206}
1207
1208static void call_plugin_timer(struct plugin *p, struct timer *timer)
1209{

Callers 1

plugin_mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected