diff --git a/eth2/state_processing/src/epoch_processable.rs b/eth2/state_processing/src/epoch_processable.rs index 2cee455a3..0ecd1bbd1 100644 --- a/eth2/state_processing/src/epoch_processable.rs +++ b/eth2/state_processing/src/epoch_processable.rs @@ -619,12 +619,6 @@ impl EpochProcessable for BeaconState { .cloned() .collect(); - /* - * Manage the beacon state caches - */ - self.advance_caches(); - self.build_epoch_cache(RelativeEpoch::Next, spec)?; - debug!("Epoch transition complete."); Ok(()) diff --git a/eth2/state_processing/src/slot_processable.rs b/eth2/state_processing/src/slot_processable.rs index 0bbc79ab0..6017f4c0a 100644 --- a/eth2/state_processing/src/slot_processable.rs +++ b/eth2/state_processing/src/slot_processable.rs @@ -26,6 +26,7 @@ where ) -> Result<(), Error> { if (self.slot + 1) % spec.epoch_length == 0 { self.per_epoch_processing(spec)?; + self.advance_caches(); } self.slot += 1;