From e53a6daecc179f50cf9d3877483d568127a98d20 Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Sun, 8 Dec 2019 11:50:04 -0700 Subject: [PATCH] clarify fliter block tree through two line usage Co-Authored-By: Hsiao-Wei Wang --- specs/core/0_fork-choice.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specs/core/0_fork-choice.md b/specs/core/0_fork-choice.md index 3cdbcbc5a..95e8ee7a2 100644 --- a/specs/core/0_fork-choice.md +++ b/specs/core/0_fork-choice.md @@ -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