| 472 | } |
| 473 | |
| 474 | static void init_gossmap(struct plugin *plugin) |
| 475 | { |
| 476 | size_t num_cupdates_rejected; |
| 477 | global_gossmap |
| 478 | = notleak_with_children(gossmap_load(NULL, |
| 479 | GOSSIP_STORE_FILENAME, |
| 480 | &num_cupdates_rejected)); |
| 481 | if (!global_gossmap) |
| 482 | plugin_err(plugin, "Could not load gossmap %s: %s", |
| 483 | GOSSIP_STORE_FILENAME, strerror(errno)); |
| 484 | if (num_cupdates_rejected) |
| 485 | plugin_log(plugin, LOG_DBG, |
| 486 | "gossmap ignored %zu channel updates", |
| 487 | num_cupdates_rejected); |
| 488 | } |
| 489 | |
| 490 | static struct gossmap *get_gossmap(struct plugin *plugin) |
| 491 | { |
no test coverage detected