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.
This commit is contained in:
parent
5f9e6599e9
commit
d0cf4e7bad
|
@ -230,7 +230,7 @@ def get_head(store: Store) -> Root:
|
||||||
while True:
|
while True:
|
||||||
children = [
|
children = [
|
||||||
root for root in blocks.keys()
|
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:
|
if len(children) == 0:
|
||||||
return head
|
return head
|
||||||
|
|
Loading…
Reference in New Issue