From cb9f24224d8adbdc8a4103ac24eb8f12756fd67c Mon Sep 17 00:00:00 2001 From: Age Manning Date: Wed, 13 Feb 2019 18:31:20 +1100 Subject: [PATCH] Use Height struct in optimised_lmd_ghost. --- eth2/fork_choice/src/optimised_lmd_ghost.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eth2/fork_choice/src/optimised_lmd_ghost.rs b/eth2/fork_choice/src/optimised_lmd_ghost.rs index 0d59befefd..ec5f73cf49 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;