| 594 | } |
| 595 | |
| 596 | static 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 | |
| 615 | static const struct plugin_command commands[] = { |
| 616 | { |
nothing calls this directly
no test coverage detected