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

Function json_to_allowed_features

common/test/run-route_blinding_test.c:84–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84static u8 *json_to_allowed_features(const tal_t *ctx,
85 const char *buf, const jsmntok_t *t)
86{
87 size_t i;
88 const jsmntok_t *f, *features = json_get_member(buf, t, "features");
89 u8 *allowed_features;
90
91 allowed_features = tal_arr(ctx, u8, 0);
92 json_for_each_arr(i, f, features) {
93 u32 n;
94 assert(json_to_u32(buf, f, &n));
95 set_feature_bit(&allowed_features, n);
96 }
97 return allowed_features;
98}
99
100static u8 *json_to_enctlvs(const tal_t *ctx,
101 const char *buf, const jsmntok_t *tlvs)

Callers 1

json_to_enctlvsFunction · 0.85

Calls 3

json_get_memberFunction · 0.85
set_feature_bitFunction · 0.85
json_to_u32Function · 0.70

Tested by

no test coverage detected