Fixes in ssz impl

This commit is contained in:
Dankrad Feist 2019-06-27 16:31:33 +01:00
parent 2cb23d35ea
commit afd86f71de
No known key found for this signature in database
GPG Key ID: 6815E6A20BEBBABA
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ def chunk_count(typ: SSZType) -> int:
if isinstance(typ, BasicType):
return 1
elif issubclass(typ, Bitfield):
return (typ.length + 7) // 8 // 32
return (typ.length + 255) // 256
elif issubclass(typ, Elements):
return (typ.length * item_length(typ.elem_type) + 31) // 32
elif issubclass(typ, Container):