clarify fliter block tree through two line usage
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
This commit is contained in:
parent
7baf81e4c2
commit
e53a6daecc
|
@ -149,7 +149,8 @@ def filter_block_tree(store: Store, block_root: Root, blocks: Dict[Root, BeaconB
|
||||||
# If any children branches contain expected finalized/justified checkpoints,
|
# If any children branches contain expected finalized/justified checkpoints,
|
||||||
# add to filtered block-tree and signal viability to parent.
|
# add to filtered block-tree and signal viability to parent.
|
||||||
if any(children):
|
if any(children):
|
||||||
if True in [filter_block_tree(store, child, blocks) for child in children]:
|
filter_block_tree_result = [filter_block_tree(store, child, blocks) for child in children]
|
||||||
|
if any(filter_block_tree_result):
|
||||||
blocks[block_root] = block
|
blocks[block_root] = block
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in New Issue