Update specs/light_client/merkle_proofs.md

Co-Authored-By: Danny Ryan <dannyjryan@gmail.com>
This commit is contained in:
vbuterin 2019-08-01 18:11:45 -04:00 committed by GitHub
parent 1b852adef1
commit 44bd00164e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -75,7 +75,8 @@ def get_elem_type(typ: ComplexType, index: int) -> Type:
or member variable name (eg. `7` for `x[7]`, `"foo"` for `x.foo`)
"""
return typ.get_fields()[key] if issubclass(typ, Container) else typ.elem_type
def chunk_count(typ: SSZType) -> int:
"""
Returns the number of hashes needed to represent the top-level elements in the given type