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

Function gossmap_node_get_features

common/gossmap.c:1808–1825  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1806}
1807
1808u8 *gossmap_node_get_features(const tal_t *ctx,
1809 const struct gossmap *map,
1810 const struct gossmap_node *n)
1811{
1812 u8 *ret;
1813 /* Note that first two bytes are message type */
1814 const u64 feature_len_off = 2 + 64;
1815 size_t feature_len;
1816
1817 if (n->nann_off == 0)
1818 return NULL;
1819
1820 feature_len = map_be16(map, n->nann_off + feature_len_off);
1821 ret = tal_arr(ctx, u8, feature_len);
1822
1823 map_copy(map, n->nann_off + feature_len_off + 2, ret, feature_len);
1824 return ret;
1825}
1826
1827bool gossmap_scidd_pubkey(struct gossmap *gossmap,
1828 struct sciddir_or_pubkey *sciddpk)

Callers 1

Calls 2

map_be16Function · 0.85
map_copyFunction · 0.85

Tested by

no test coverage detected