Merge pull request #3838 from kocubinski/dev
Fix spec error in get_generalized_index function
This commit is contained in:
commit
1a086f658c
|
@ -176,8 +176,8 @@ def get_generalized_index(typ: SSZType, *path: PyUnion[int, SSZVariableName]) ->
|
||||||
for p in path:
|
for p in path:
|
||||||
assert not issubclass(typ, BasicValue) # If we descend to a basic type, the path cannot continue further
|
assert not issubclass(typ, BasicValue) # If we descend to a basic type, the path cannot continue further
|
||||||
if p == '__len__':
|
if p == '__len__':
|
||||||
typ = uint64
|
|
||||||
assert issubclass(typ, (List, ByteList))
|
assert issubclass(typ, (List, ByteList))
|
||||||
|
typ = uint64
|
||||||
root = GeneralizedIndex(root * 2 + 1)
|
root = GeneralizedIndex(root * 2 + 1)
|
||||||
else:
|
else:
|
||||||
pos, _, _ = get_item_position(typ, p)
|
pos, _, _ = get_item_position(typ, p)
|
||||||
|
|
Loading…
Reference in New Issue