mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-21 14:58:31 +00:00
Merge remote-tracking branch 'origin/unstable' into tree-states
This commit is contained in:
@@ -1152,7 +1152,7 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
|
||||
let state_cacher_hook = |opt_state_root: Option<Hash256>, state: &mut BeaconState<_>| {
|
||||
// Ensure all caches are built before attempting to cache.
|
||||
state.update_tree_hash_cache()?;
|
||||
state.build_all_caches(&self.spec)?;
|
||||
state.build_caches(&self.spec)?;
|
||||
|
||||
if let Some(state_root) = opt_state_root {
|
||||
// Cache
|
||||
@@ -1246,7 +1246,7 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
|
||||
)?;
|
||||
|
||||
state.update_tree_hash_cache()?;
|
||||
state.build_all_caches(&self.spec)?;
|
||||
state.build_caches(&self.spec)?;
|
||||
}
|
||||
|
||||
// Apply state diff. Block replay should have ensured that the diff is now applicable.
|
||||
@@ -1280,7 +1280,7 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
|
||||
let tree_hash_ms = t.elapsed().as_millis();
|
||||
|
||||
let t = std::time::Instant::now();
|
||||
state.build_all_caches(&self.spec)?;
|
||||
state.build_caches(&self.spec)?;
|
||||
let cache_ms = t.elapsed().as_millis();
|
||||
|
||||
debug!(
|
||||
@@ -1358,7 +1358,7 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
|
||||
|
||||
// Do a tree hash here so that the cache is fully built.
|
||||
state.update_tree_hash_cache()?;
|
||||
state.build_all_caches(&self.spec)?;
|
||||
state.build_caches(&self.spec)?;
|
||||
|
||||
let latest_block_root = state.get_latest_block_root(*state_root);
|
||||
Ok((state, latest_block_root))
|
||||
|
||||
@@ -57,7 +57,7 @@ where
|
||||
.load_cold_state_by_slot(lower_limit_slot)?
|
||||
.ok_or(HotColdDBError::MissingLowerLimitState(lower_limit_slot))?;
|
||||
|
||||
state.build_all_caches(&self.spec)?;
|
||||
state.build_caches(&self.spec)?;
|
||||
|
||||
process_results(block_root_iter, |iter| -> Result<(), Error> {
|
||||
let mut io_batch = vec![];
|
||||
|
||||
Reference in New Issue
Block a user