diff --git a/specs/simple-serialize.md b/specs/simple-serialize.md index b609aa100..b888ca76f 100644 --- a/specs/simple-serialize.md +++ b/specs/simple-serialize.md @@ -390,7 +390,7 @@ Return the hash of the serialization of the value. #### List/Vectors -First, we define some helpers and then the Merkle tree function. +First, we define the Merkle tree function. ```python # Merkle tree hash of a list of homogenous, non-empty items @@ -406,7 +406,10 @@ def merkle_hash(lst): items_per_chunk = SSZ_CHUNK_SIZE // len(lst[0]) # Build a list of chunks based on the number of items in the chunk - chunkz = [b''.join(lst[i:i+items_per_chunk]) for i in range(0, len(lst), items_per_chunk)] + chunkz = [ + zpad(b''.join(lst[i:i + items_per_chunk]), SSZ_CHUNK_SIZE) + for i in range(0, len(lst), items_per_chunk) + ] else: # Leave large items alone chunkz = lst