| 6 | #include <stdio.h> |
| 7 | |
| 8 | int main(int argc, char *argv[]) |
| 9 | { |
| 10 | const u8 *features; |
| 11 | |
| 12 | setup_locale(); |
| 13 | |
| 14 | if (argc != 2) |
| 15 | errx(1, "Usage: %s <hexstring>", argv[0]); |
| 16 | |
| 17 | features = tal_hexdata(NULL, argv[1], strlen(argv[1])); |
| 18 | if (!features) |
| 19 | errx(1, "bad hexstring"); |
| 20 | |
| 21 | for (size_t i = 0; i < tal_bytelen(features) * 8; i++) { |
| 22 | if (feature_is_set(features, i)) |
| 23 | printf("%s (%s)\n", |
| 24 | feature_name(features, i), |
| 25 | i % 2 ? "optional" : "compulsory"); |
| 26 | } |
| 27 | tal_free(features); |
| 28 | } |
nothing calls this directly
no test coverage detected