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

Function list_supported_features

common/features.c:503–514  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

501}
502
503const char **list_supported_features(const tal_t *ctx,
504 const struct feature_set *fset)
505{
506 const char **list = tal_arr(ctx, const char *, 0);
507
508 for (size_t i = 0; i < tal_bytelen(fset->bits[INIT_FEATURE]) * 8; i++) {
509 if (test_bit(fset->bits[INIT_FEATURE], i / 8, i % 8))
510 tal_arr_expand(&list, feature_name(list, i));
511 }
512
513 return list;
514}
515
516u8 *featurebits_or(const tal_t *ctx, const u8 *f1 TAKES, const u8 *f2 TAKES)
517{

Callers 1

list_features_and_exitFunction · 0.85

Calls 3

tal_bytelenFunction · 0.85
test_bitFunction · 0.85
feature_nameFunction · 0.85

Tested by

no test coverage detected