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

Function gossmap_chan_get_feature

common/gossmap.c:1177–1189  ·  view source on GitHub ↗

BOLT #7: * 1. type: 256 (`channel_announcement`) * 2. data: * * [`signature`:`node_signature_1`] * * [`signature`:`node_signature_2`] * * [`signature`:`bitcoin_signature_1`] * * [`signature`:`bitcoin_signature_2`] * * [`u16`:`len`] * * [`len*byte`:`features`] * * [`chain_hash`:`chain_hash`] * * [`short_channel_id`:`short_channel_id`] * * [`point`:`nod

Source from the content-addressed store, hash-verified

1175 * * [`point`:`node_id_2`]
1176 */
1177int gossmap_chan_get_feature(const struct gossmap *map,
1178 const struct gossmap_chan *c,
1179 int fbit)
1180{
1181 /* Note that first two bytes are message type */
1182 const size_t feature_len_off = 2 + (64 + 64 + 64 + 64);
1183 size_t feature_len;
1184
1185 feature_len = map_be16(map, c->cann_off + feature_len_off);
1186
1187 return map_feature_test(map, COMPULSORY_FEATURE(fbit),
1188 c->cann_off + feature_len_off + 2, feature_len);
1189}
1190
1191u8 *gossmap_chan_get_features(const tal_t *ctx,
1192 const struct gossmap *map,

Callers

nothing calls this directly

Calls 2

map_be16Function · 0.85
map_feature_testFunction · 0.85

Tested by

no test coverage detected