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

Function init_gossmap

plugins/libplugin-pay.c:19–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17static struct gossmap *global_gossmap;
18
19static void init_gossmap(struct plugin *plugin)
20{
21 size_t num_channel_updates_rejected;
22 global_gossmap
23 = notleak_with_children(gossmap_load(NULL,
24 GOSSIP_STORE_FILENAME,
25 &num_channel_updates_rejected));
26 if (!global_gossmap)
27 plugin_err(plugin, "Could not load gossmap %s: %s",
28 GOSSIP_STORE_FILENAME, strerror(errno));
29 if (num_channel_updates_rejected)
30 plugin_log(plugin, LOG_DBG,
31 "gossmap ignored %zu channel updates",
32 num_channel_updates_rejected);
33}
34
35struct gossmap *get_gossmap(struct plugin *plugin)
36{

Callers 1

get_gossmapFunction · 0.70

Calls 3

gossmap_loadFunction · 0.85
plugin_errFunction · 0.70
plugin_logFunction · 0.70

Tested by

no test coverage detected