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 committed Aug 26, 2019
1 parent e26f952 commit 6610841
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 @@ -166,12 +166,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 6610841

Please sign in to comment.