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

Function gossmap_chan_get_feature

common/gossmap.c:1669–1681  ·  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

1667 * * [`point`:`node_id_2`]
1668 */
1669int gossmap_chan_get_feature(const struct gossmap *map,
1670 const struct gossmap_chan *c,
1671 int fbit)
1672{
1673 /* Note that first two bytes are message type */
1674 const u64 feature_len_off = 2 + (64 + 64 + 64 + 64);
1675 size_t feature_len;
1676
1677 feature_len = map_be16(map, c->cann_off + feature_len_off);
1678
1679 return map_feature_test(map, COMPULSORY_FEATURE(fbit),
1680 c->cann_off + feature_len_off + 2, feature_len);
1681}
1682
1683u8 *gossmap_chan_get_features(const tal_t *ctx,
1684 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