From d0cf4e7bad4cbfc0a0aefa17b5e9085daa59909a Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Wed, 7 Oct 2020 16:52:51 -0700 Subject: [PATCH] Simplify fork choice spec This change should be non-substantive as any blocks in `blocks` should be descendants (inclusive) of the `store.justified_checkpoint` (refer `get_filtered_block_tree`) so that in `get_head` all blocks considered as potential heads will have `slot > justified_slot`. Considering this condition universally applies, adding the `and ...` arm to the conditional is unnecessary overhead. --- specs/phase0/fork-choice.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/phase0/fork-choice.md b/specs/phase0/fork-choice.md index 018cbec4b..9e7cb4848 100644 --- a/specs/phase0/fork-choice.md +++ b/specs/phase0/fork-choice.md @@ -230,7 +230,7 @@ def get_head(store: Store) -> Root: while True: children = [ root for root in blocks.keys() - if blocks[root].parent_root == head and blocks[root].slot > justified_slot + if blocks[root].parent_root == head ] if len(children) == 0: return head