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

Function main

devtools/features.c:8–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6#include <stdio.h>
7
8int 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}

Callers

nothing calls this directly

Calls 7

setup_localeFunction · 0.85
errxFunction · 0.85
tal_hexdataFunction · 0.85
tal_bytelenFunction · 0.85
feature_nameFunction · 0.85
tal_freeFunction · 0.85
feature_is_setFunction · 0.50

Tested by

no test coverage detected