mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-26 01:05:15 +00:00
make nil-count randomization work for lists
This commit is contained in:
parent
520c872d21
commit
4f462bc88b
@ -94,6 +94,8 @@ def get_random_ssz_object(rng: Random,
|
||||
length = 1
|
||||
elif mode == RandomizationMode.mode_max_count:
|
||||
length = max_list_length
|
||||
elif mode == RandomizationMode.mode_nil_count:
|
||||
length = 0
|
||||
|
||||
if typ.length < length: # SSZ imposes a hard limit on lists, we can't put in more than that
|
||||
length = typ.length
|
||||
|
Loading…
x
Reference in New Issue
Block a user