BOLT #7: * 1. type: 257 (`node_announcement`) * 2. data: * * [`signature`:`signature`] * * [`u16`:`flen`] * * [`flen*byte`:`features`] * * [`u32`:`timestamp`] * * [`point`:`node_id`] * * [`3*byte`:`rgb_color`] * * [`32*byte`:`alias`] * * [`u16`:`addrlen`] * * [`addrlen*byte`:`addresses`] */
| 648 | * * [`addrlen*byte`:`addresses`] |
| 649 | */ |
| 650 | static void node_announcement(struct gossmap *map, u64 nann_off) |
| 651 | { |
| 652 | const u64 feature_len_off = 2 + 64; |
| 653 | size_t feature_len; |
| 654 | struct gossmap_node *n; |
| 655 | struct node_id id; |
| 656 | |
| 657 | feature_len = map_be16(map, nann_off + feature_len_off); |
| 658 | map_nodeid(map, nann_off + feature_len_off + 2 + feature_len + 4, &id); |
| 659 | if ((n = gossmap_find_node(map, &id))) { |
| 660 | /* Did this replace old announcement? If so, that's dead. */ |
| 661 | if (gossmap_node_announced(n)) { |
| 662 | map->num_live--; |
| 663 | map->num_dead++; |
| 664 | } |
| 665 | n->nann_off = nann_off; |
| 666 | } |
| 667 | map->num_live++; |
| 668 | } |
| 669 | |
| 670 | static bool report_dying_cb(struct gossmap *map, |
| 671 | u64 dying_off, |
no test coverage detected