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

Function hex_bits

tests/utils.py:32–39  ·  view source on GitHub ↗
(features)

Source from the content-addressed store, hash-verified

30
31
32def hex_bits(features):
33 # We always to full bytes
34 flen = (max(features + [0]) + 7) // 8 * 8
35 res = bitstring.BitArray(length=flen)
36 # Big endian sucketh.
37 for f in features:
38 res[flen - 1 - f] = 1
39 return res.hex
40
41
42def expected_peer_features(extra=[]):

Callers 3

expected_peer_featuresFunction · 0.85
expected_node_featuresFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected