mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-13 04:04:19 +00:00
Merge pull request #104 from mratsim/lists-homogeneous-types
Mention that lists are of elements of homogeneous type
This commit is contained in:
commit
9b75191ece
@ -186,6 +186,8 @@ return byte_length + value
|
|||||||
|
|
||||||
#### List/Vectors
|
#### List/Vectors
|
||||||
|
|
||||||
|
Lists are a collection of elements of the same homogeneous type.
|
||||||
|
|
||||||
| Check to perform | Code |
|
| Check to perform | Code |
|
||||||
|:--------------------------------------------|:----------------------------|
|
|:--------------------------------------------|:----------------------------|
|
||||||
| Length of serialized list fits into 4 bytes | ``len(serialized) < 2**32`` |
|
| Length of serialized list fits into 4 bytes | ``len(serialized) < 2**32`` |
|
||||||
@ -327,7 +329,7 @@ return rawbytes[bytes_start:bytes_end], new_index
|
|||||||
|
|
||||||
#### List/Vectors
|
#### List/Vectors
|
||||||
|
|
||||||
Deserialize each object in the list.
|
Deserialize each element in the list.
|
||||||
1. Get the length of the serialized list.
|
1. Get the length of the serialized list.
|
||||||
2. Loop through deserializing each item in the list until you reach the
|
2. Loop through deserializing each item in the list until you reach the
|
||||||
entire length of the list.
|
entire length of the list.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user