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

Function gossmap_chan_get_feature

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

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