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

Function gossmap_chan_get_features

common/gossmap.c:1677–1691  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1675}
1676
1677u8 *gossmap_chan_get_features(const tal_t *ctx,
1678 const struct gossmap *map,
1679 const struct gossmap_chan *c)
1680{
1681 u8 *ret;
1682 /* Note that first two bytes are message type */
1683 const u64 feature_len_off = 2 + (64 + 64 + 64 + 64);
1684 size_t feature_len;
1685
1686 feature_len = map_be16(map, c->cann_off + feature_len_off);
1687 ret = tal_arr(ctx, u8, feature_len);
1688
1689 map_copy(map, c->cann_off + feature_len_off + 2, ret, feature_len);
1690 return ret;
1691}
1692
1693/* Return the channel_update (or NULL if !gossmap_chan_set) */
1694u8 *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