Add comment about INVALID block

This commit is contained in:
Paul Hauner 2022-01-12 16:43:36 +11:00
parent 0ae80d9382
commit de1a6caa5d
No known key found for this signature in database
GPG Key ID: 5E2CFF9B75FA63DF
1 changed files with 1 additions and 0 deletions

View File

@ -47,6 +47,7 @@ def is_optimistic(store: Store, block: BeaconBlock) -> bool:
```python
def latest_verified_ancestor(store: Store, block: BeaconBlock) -> BeaconBlock:
# It is assumed that the `block` parameter is never an INVALID block.
while True:
if not is_optimistic(store, block) or block.parent_root == Root():
return block