From adf2585e94aca469ce8b812d8f4e492e54a03b0e Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Tue, 5 Feb 2019 21:51:43 +0100 Subject: [PATCH] Use little endian bit order Slightly more simple and common to find bit n at position `1 << n` --- specs/core/0_beacon-chain.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index d93cb21d71..98027ff6ee 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -1059,7 +1059,7 @@ def get_bitfield_bit(bitfield: bytes, i: int) -> int: """ Extract the bit in ``bitfield`` at position ``i``. """ - return (bitfield[i // 8] >> (7 - (i % 8))) % 2 + return (bitfield[i // 8] >> (i % 8)) % 2 ``` ### `verify_bitfield`