mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-03 06:13:31 +00:00
Fix latest_valid_ancestor
This commit is contained in:
parent
d1851dce21
commit
4c4ffe71b4
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user