Skip to content

Commit

Permalink
Sync with ethereum/consensus-specs#1306 (no logic change)
Browse files Browse the repository at this point in the history
  • Loading branch information
hwwhww authored and ralexstokes committed Aug 31, 2019
1 parent 75f9680 commit 087c853
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions eth2/beacon/fork_choice/lmd_ghost.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@ def get_ancestor(self, block: BaseBeaconBlock, slot: Slot) -> BaseBeaconBlock:
Return the block in the chain that is a
predecessor of ``block`` at the requested ``slot``.
"""
if block.slot == slot:
if block.slot > slot:
return self.get_ancestor(self._get_parent_block(block), slot)
elif block.slot == slot:
return block
elif block.slot < slot:
return None
else:
return self.get_ancestor(self._get_parent_block(block), slot)
return None


AttestationTarget = Tuple[ValidatorIndex, Optional[BaseBeaconBlock]]
Expand Down

0 comments on commit 087c853

Please sign in to comment.