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

Function gossmap_chan_get_features

common/gossmap.c:1683–1697  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1681}
1682
1683u8 *gossmap_chan_get_features(const tal_t *ctx,
1684 const struct gossmap *map,
1685 const struct gossmap_chan *c)
1686{
1687 u8 *ret;
1688 /* Note that first two bytes are message type */
1689 const u64 feature_len_off = 2 + (64 + 64 + 64 + 64);
1690 size_t feature_len;
1691
1692 feature_len = map_be16(map, c->cann_off + feature_len_off);
1693 ret = tal_arr(ctx, u8, feature_len);
1694
1695 map_copy(map, c->cann_off + feature_len_off + 2, ret, feature_len);
1696 return ret;
1697}
1698
1699/* Return the channel_update (or NULL if !gossmap_chan_set) */
1700u8 *gossmap_chan_get_update(const tal_t *ctx,

Callers 3

mainFunction · 0.85
mainFunction · 0.85
json_add_halfchanFunction · 0.85

Calls 2

map_be16Function · 0.85
map_copyFunction · 0.85

Tested by 2

mainFunction · 0.68
mainFunction · 0.68