From 4dd1239b243b467cc61bfec282ecae696f082270 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Sun, 28 Apr 2019 11:33:48 +1000 Subject: [PATCH] Add caching to state transition --- eth2/state_processing/src/per_slot_processing.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eth2/state_processing/src/per_slot_processing.rs b/eth2/state_processing/src/per_slot_processing.rs index a68f98c6d..8dbf65fa7 100644 --- a/eth2/state_processing/src/per_slot_processing.rs +++ b/eth2/state_processing/src/per_slot_processing.rs @@ -24,7 +24,8 @@ pub fn per_slot_processing(state: &mut BeaconState, spec: &ChainSpec) -> Result< } fn cache_state(state: &mut BeaconState, spec: &ChainSpec) -> Result<(), Error> { - let previous_slot_state_root = Hash256::from_slice(&state.tree_hash_root()[..]); + // let previous_slot_state_root = Hash256::from_slice(&state.tree_hash_root()[..]); + let previous_slot_state_root = state.update_tree_hash_cache()?; // Note: increment the state slot here to allow use of our `state_root` and `block_root` // getter/setter functions.