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

Function fmt_featurebits

common/features.c:585–598  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

583}
584
585const char *fmt_featurebits(const tal_t *ctx, const u8 *featurebits)
586{
587 size_t size = tal_count(featurebits);
588 char *fmt = tal_strdup(ctx, "");
589 const char *prefix = "";
590
591 for (size_t i = 0; i < size * 8; i++) {
592 if (feature_is_set(featurebits, i)) {
593 tal_append_fmt(&fmt, "%s%zu", prefix, i);
594 prefix = ",";
595 }
596 }
597 return fmt;
598}
599
600struct feature_set *feature_set_dup(const tal_t *ctx,
601 const struct feature_set *other)

Callers 6

handle_channel_upgradeFunction · 0.85
funder_channel_startFunction · 0.85
fundee_channelFunction · 0.85
accepter_startFunction · 0.85
opener_startFunction · 0.85

Calls 2

feature_is_setFunction · 0.85
tal_append_fmtFunction · 0.85

Tested by

no test coverage detected