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

Function node_announcement

common/gossmap.c:576–587  ·  view source on GitHub ↗

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`] */

Source from the content-addressed store, hash-verified

574 * * [`addrlen*byte`:`addresses`]
575 */
576static void node_announcement(struct gossmap *map, size_t nann_off)
577{
578 const size_t feature_len_off = 2 + 64;
579 size_t feature_len;
580 struct gossmap_node *n;
581 struct node_id id;
582
583 feature_len = map_be16(map, nann_off + feature_len_off);
584 map_nodeid(map, nann_off + feature_len_off + 2 + feature_len + 4, &id);
585 n = gossmap_find_node(map, &id);
586 n->nann_off = nann_off;
587}
588
589static void reopen_store(struct gossmap *map, size_t ended_off)
590{

Callers 1

map_catchupFunction · 0.85

Calls 3

map_be16Function · 0.85
map_nodeidFunction · 0.85
gossmap_find_nodeFunction · 0.85

Tested by

no test coverage detected