From 2914d77cd38d19abc88249955cb8b0c1ee3392b2 Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Tue, 2 Apr 2019 14:18:07 +1100 Subject: [PATCH] spec: update to v0.5.1 --- eth2/state_processing/src/per_block_processing.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/eth2/state_processing/src/per_block_processing.rs b/eth2/state_processing/src/per_block_processing.rs index 5afddc74e..6eafcb937 100644 --- a/eth2/state_processing/src/per_block_processing.rs +++ b/eth2/state_processing/src/per_block_processing.rs @@ -99,7 +99,7 @@ fn per_block_processing_signature_optional( /// Processes the block header. /// -/// Spec v0.5.0 +/// Spec v0.5.1 pub fn process_block_header( state: &mut BeaconState, block: &BeaconBlock, @@ -107,11 +107,8 @@ pub fn process_block_header( ) -> Result<(), Error> { verify!(block.slot == state.slot, Invalid::StateSlotMismatch); - // NOTE: this is not to spec. I think spec is broken. See: - // - // https://github.com/ethereum/eth2.0-specs/issues/797 verify!( - block.previous_block_root == *state.get_block_root(state.slot - 1, spec)?, + block.previous_block_root == Hash256::from_slice(&state.latest_block_header.signed_root()), Invalid::ParentBlockRootMismatch );