Merge pull request #263 from sigp/remove-next-epoch-cache-build

Remove cache operations from epoch processing
This commit is contained in:
Age Manning 2019-03-01 12:40:52 +11:00 committed by GitHub
commit 20d7407faa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 6 deletions

View File

@ -619,12 +619,6 @@ impl EpochProcessable for BeaconState {
.cloned() .cloned()
.collect(); .collect();
/*
* Manage the beacon state caches
*/
self.advance_caches();
self.build_epoch_cache(RelativeEpoch::Next, spec)?;
debug!("Epoch transition complete."); debug!("Epoch transition complete.");
Ok(()) Ok(())

View File

@ -26,6 +26,7 @@ where
) -> Result<(), Error> { ) -> Result<(), Error> {
if (self.slot + 1) % spec.epoch_length == 0 { if (self.slot + 1) % spec.epoch_length == 0 {
self.per_epoch_processing(spec)?; self.per_epoch_processing(spec)?;
self.advance_caches();
} }
self.slot += 1; self.slot += 1;