mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-07 08:04:23 +01:00
features: Add featurebits_or helper to combine two featurebitstrings
We will be doing this when collecting featurebits from the plugins, so make this a reusable function.
This commit is contained in:
committed by
Rusty Russell
parent
ea62d97879
commit
9b976da3bc
@@ -87,10 +87,7 @@ static struct io_plan *peer_init_received(struct io_conn *conn,
|
||||
|
||||
/* The globalfeatures field is now unused, but there was a
|
||||
* window where it was: combine the two. */
|
||||
for (size_t i = 0; i < tal_bytelen(globalfeatures) * 8; i++) {
|
||||
if (feature_is_set(globalfeatures, i))
|
||||
set_feature_bit(&features, i);
|
||||
}
|
||||
features = featurebits_or(tmpctx, take(features), globalfeatures);
|
||||
|
||||
/* BOLT #1:
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user