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

Function gossmap_chan_get_features

common/gossmap.c:1191–1205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1189}
1190
1191u8 *gossmap_chan_get_features(const tal_t *ctx,
1192 const struct gossmap *map,
1193 const struct gossmap_chan *c)
1194{
1195 u8 *ret;
1196 /* Note that first two bytes are message type */
1197 const size_t feature_len_off = 2 + (64 + 64 + 64 + 64);
1198 size_t feature_len;
1199
1200 feature_len = map_be16(map, c->cann_off + feature_len_off);
1201 ret = tal_arr(ctx, u8, feature_len);
1202
1203 map_copy(map, c->cann_off + feature_len_off + 2, ret, feature_len);
1204 return ret;
1205}
1206
1207/* BOLT #7:
1208 * 1. type: 258 (`channel_update`)

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