Merge pull request #3838 from kocubinski/dev

Fix spec error in get_generalized_index function
This commit is contained in:
Hsiao-Wei Wang 2024-08-03 15:06:01 +09:00 committed by GitHub
commit 1a086f658c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -176,8 +176,8 @@ def get_generalized_index(typ: SSZType, *path: PyUnion[int, SSZVariableName]) ->
for p in path:
assert not issubclass(typ, BasicValue) # If we descend to a basic type, the path cannot continue further
if p == '__len__':
typ = uint64
assert issubclass(typ, (List, ByteList))
typ = uint64
root = GeneralizedIndex(root * 2 + 1)
else:
pos, _, _ = get_item_position(typ, p)