Alex Stokes
6c2c42e6b7
Adds custom std::cmp::PartialEq
impl
...
Two bitfields now match if they contain the same information.
There were some discrepancies before when comparing fields with the same
bits set but came from different sources, e.g. off the wire vs created
in memory, due to the existence of unset bits in the high byte.
2018-12-10 20:34:35 -08:00
Alex Stokes
564f13be5f
fixes bug with serialization logic for boolean bitfield
...
should match the python impl
2018-12-03 20:46:11 -08:00
Paul Hauner
bedc1abec0
Add failing boolean bitfield test
2018-12-03 17:13:39 +11:00
Paul Hauner
f65888226a
Add some extra tests for boolean-bitfield
2018-11-22 14:18:08 -08:00
Alex Stokes
57dcad149f
Fixes bug with ssz
encoding of BooleanBitfield
2018-11-20 12:40:13 -08:00
Alex Stokes
031b7bf225
Add method to calculate the underlying number of bytes
...
Required for part of attestation validation logic
2018-11-20 12:40:13 -08:00
Alex Stokes
832d1bd295
Update bitfield to expand size when writing out-of-bounds
2018-11-20 12:38:23 -08:00
Alex Stokes
37b05e1a5b
get tests passing (except one)
2018-11-20 12:38:23 -08:00
Alex Stokes
a9decd3aed
Simplifies the boolean-bitfield implementation to use bit-vec
crate
2018-11-20 12:34:28 -08:00
Paul Hauner
900ffac5e0
Run rustfmt globally.
...
Using `$ cargo fmt` in the root. Closes #68 .
2018-11-04 15:35:55 +01:00
Paul Hauner
0fbe4179b3
Heavily restructure repo
...
Separate most modules into crates
2018-10-02 16:41:10 +10:00