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

Function fmt_featurebits

common/features.c:571–584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

569}
570
571const char *fmt_featurebits(const tal_t *ctx, const u8 *featurebits)
572{
573 size_t size = tal_count(featurebits);
574 char *fmt = tal_strdup(ctx, "");
575 const char *prefix = "";
576
577 for (size_t i = 0; i < size * 8; i++) {
578 if (feature_is_set(featurebits, i)) {
579 tal_append_fmt(&fmt, "%s%zu", prefix, i);
580 prefix = ",";
581 }
582 }
583 return fmt;
584}
585
586struct feature_set *feature_set_dup(const tal_t *ctx,
587 const struct feature_set *other)

Callers 6

set_channel_typeFunction · 0.85
peer_reconnectFunction · 0.85
handle_channel_upgradeFunction · 0.85
funder_channel_startFunction · 0.85
fundee_channelFunction · 0.85

Calls 2

tal_append_fmtFunction · 0.85
feature_is_setFunction · 0.70

Tested by

no test coverage detected