(features)
| 30 | |
| 31 | |
| 32 | def 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 | |
| 42 | def expected_peer_features(extra=[]): |
no outgoing calls
no test coverage detected