Skip to content

Commit

Permalink
clarify fliter block tree through two line usage
Browse files Browse the repository at this point in the history
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
  • Loading branch information
djrtwo and hwwhww committed Dec 8, 2019
1 parent 7baf81e commit e53a6da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion specs/core/0_fork-choice.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
# add to filtered block-tree and signal viability to parent.
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
return True
return False
Expand Down

0 comments on commit e53a6da

Please sign in to comment.