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`] */
| 1275 | * * [`addrlen*byte`:`addresses`] |
| 1276 | */ |
| 1277 | int gossmap_node_get_feature(const struct gossmap *map, |
| 1278 | const struct gossmap_node *n, |
| 1279 | int fbit) |
| 1280 | { |
| 1281 | const size_t feature_len_off = 2 + 64; |
| 1282 | size_t feature_len; |
| 1283 | |
| 1284 | if (n->nann_off == 0) |
| 1285 | return -1; |
| 1286 | |
| 1287 | feature_len = map_be16(map, n->nann_off + feature_len_off); |
| 1288 | |
| 1289 | return map_feature_test(map, COMPULSORY_FEATURE(fbit), |
| 1290 | n->nann_off + feature_len_off + 2, feature_len); |
| 1291 | } |
| 1292 | |
| 1293 | /* There are two 33-byte pubkeys possible: choose the one which appears |
| 1294 | * in the graph (otherwise payment will fail anyway). */ |
no test coverage detected