Avoid building caches during block replay (#783)

Also, make the ExitCache safe.
This commit is contained in:
Michael Sproul
2020-01-09 11:43:11 +11:00
committed by GitHub
parent da95a73605
commit d9e9c17d3b
6 changed files with 69 additions and 27 deletions

View File

@@ -133,8 +133,8 @@ impl<E: EthSpec, T: EpochTransition<E>> Case for EpochProcessing<E, T> {
let spec = &E::default_spec();
let mut result = (|| {
// Processing requires the epoch cache.
state.build_all_caches(spec)?;
// Processing requires the committee caches.
state.build_all_committee_caches(spec)?;
T::run(&mut state, spec).map(|_| state)
})();