common/features: helper to pretty-print feature bits.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2021-06-04 11:23:55 +09:30
parent 2ffd344299
commit 325d33a902
2 changed files with 18 additions and 0 deletions

View File

@@ -71,6 +71,9 @@ void set_feature_bit(u8 **ptr, u32 bit);
/* Given two featurebit vectors, combine them by applying a logical OR. */
u8 *featurebits_or(const tal_t *ctx, const u8 *f1 TAKES, const u8 *f2 TAKES);
/* Good for debugging: returns comma-separated string of bits. */
const char *fmt_featurebits(const tal_t *ctx, const u8 *featurebits);
/* BOLT #9:
*
* Flags are numbered from the least-significant bit, at bit 0 (i.e. 0x1,