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

Function init

plugins/topology.c:596–613  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

594}
595
596static const char *init(struct command *init_cmd,
597 const char *buf UNUSED, const jsmntok_t *config UNUSED)
598{
599 plugin = init_cmd->plugin;
600 rpc_scan(init_cmd, "getinfo",
601 take(json_out_obj(NULL, NULL, NULL)),
602 "{id:%}", JSON_SCAN(json_to_node_id, &local_id));
603
604 global_gossmap = gossmap_load(NULL,
605 GOSSIP_STORE_FILENAME,
606 plugin_gossmap_logcb, plugin);
607 if (!global_gossmap)
608 plugin_err(plugin, "Could not load gossmap %s: %s",
609 GOSSIP_STORE_FILENAME, strerror(errno));
610
611 plugin_set_memleak_handler(plugin, memleak_mark);
612 return NULL;
613}
614
615static const struct plugin_command commands[] = {
616 {

Callers

nothing calls this directly

Calls 4

rpc_scanFunction · 0.70
json_out_objFunction · 0.70
plugin_errFunction · 0.70

Tested by

no test coverage detected