From 4c4ffe71b4c20634ddeb238fe50e304fb1b239f1 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Tue, 14 Dec 2021 15:54:33 +1100 Subject: [PATCH] Fix latest_valid_ancestor --- sync/optimistic.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sync/optimistic.md b/sync/optimistic.md index edb54ab27..ccae7d093 100644 --- a/sync/optimistic.md +++ b/sync/optimistic.md @@ -85,7 +85,7 @@ def is_optimistic(block: BeaconBlock) -> bool: ```python def latest_valid_ancestor(block: BeaconBlock) -> BeaconBlock: - while block.parent_root != Root(): + while True: if not is_optimistic(block) or block.parent_root == Root(): return block block = get_block(block.parent_root)