BOLT #7: * 1. type: 257 (`node_announcement`) * 2. data: * * [`signature`:`signature`] * * [`u16`:`flen`] * * [`flen*byte`:`features`] * * [`u32`:`timestamp`] * * [`point`:`node_id`] * * [`3*byte`:`rgb_color`] * * [`32*byte`:`alias`] * * [`u16`:`addrlen`] * * [`addrlen*byte`:`addresses`] */
| 1784 | * * [`addrlen*byte`:`addresses`] |
| 1785 | */ |
| 1786 | int gossmap_node_get_feature(const struct gossmap *map, |
| 1787 | const struct gossmap_node *n, |
| 1788 | int fbit) |
| 1789 | { |
| 1790 | const u64 feature_len_off = 2 + 64; |
| 1791 | size_t feature_len; |
| 1792 | |
| 1793 | if (n->nann_off == 0) |
| 1794 | return -1; |
| 1795 | |
| 1796 | feature_len = map_be16(map, n->nann_off + feature_len_off); |
| 1797 | |
| 1798 | return map_feature_test(map, COMPULSORY_FEATURE(fbit), |
| 1799 | n->nann_off + feature_len_off + 2, feature_len); |
| 1800 | } |
| 1801 | |
| 1802 | u8 *gossmap_node_get_features(const tal_t *ctx, |
| 1803 | const struct gossmap *map, |
no test coverage detected