ethereum / py-ssz

Python implementation of the Simple Serialize encoding and decoding
MIT License
32 stars 22 forks source link

Fix homogeneous sequence boundary #117

Closed hwwhww closed 4 years ago

hwwhww commented 4 years ago

What was wrong?

Address issue #116

How was it fixed?

  1. Remove HomogeneousProperCompositeSedes.__init_()
  2. Update vector types' (Vector and Bitvector) __init__() with illegal condition max_length < 1.
  3. Add list types' (List and Bitlist) __init__() with illegal condition max_length < 0.
  4. Use ValueError for these exceptions.
  5. Add tests: test_homogeneous_sequence_length_boundary and test_bitfield_length_boundary

Cute Animal Picture

animal-5302420_640

/cc @booleanfunction @saltiniroberto