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

Function list_supported_features

common/features.c:488–499  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

486}
487
488const char **list_supported_features(const tal_t *ctx,
489 const struct feature_set *fset)
490{
491 const char **list = tal_arr(ctx, const char *, 0);
492
493 for (size_t i = 0; i < tal_bytelen(fset->bits[INIT_FEATURE]) * 8; i++) {
494 if (test_bit(fset->bits[INIT_FEATURE], i / 8, i % 8))
495 tal_arr_expand(&list, feature_name(list, i));
496 }
497
498 return list;
499}
500
501u8 *featurebits_or(const tal_t *ctx, const u8 *f1 TAKES, const u8 *f2 TAKES)
502{

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