diff --git a/eth2/fork_choice/src/optimised_lmd_ghost.rs b/eth2/fork_choice/src/optimised_lmd_ghost.rs index 0d59befef..ec5f73cf4 100644 --- a/eth2/fork_choice/src/optimised_lmd_ghost.rs +++ b/eth2/fork_choice/src/optimised_lmd_ghost.rs @@ -315,7 +315,7 @@ impl ForkChoice for OptimisedLMDGhost { .get_reader(&target_block_root)? .ok_or_else(|| ForkChoiceError::MissingBeaconBlock(*target_block_root))? .slot() - - GENESIS_SLOT; + .height(Slot::from(GENESIS_SLOT)); // get the height of the past target block let past_block_height = self @@ -323,7 +323,7 @@ impl ForkChoice for OptimisedLMDGhost { .get_reader(&attestation_target)? .ok_or_else(|| ForkChoiceError::MissingBeaconBlock(*attestation_target))? .slot() - - GENESIS_SLOT; + .height(Slot::from(GENESIS_SLOT)); // update the attestation only if the new target is higher if past_block_height < block_height { *attestation_target = *target_block_root;