mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-19 05:48:31 +00:00
Add tree hash cache as field to BeaconState.
This commit is contained in:
@@ -45,17 +45,7 @@ impl CachedTreeHasher {
|
||||
where
|
||||
T: CachedTreeHash<T>,
|
||||
{
|
||||
// Reset the per-hash counters.
|
||||
self.cache.chunk_index = 0;
|
||||
self.cache.schema_index = 0;
|
||||
|
||||
// Reset the "modified" flags for the cache.
|
||||
self.cache.reset_modifications();
|
||||
|
||||
// Update the cache with the (maybe) changed object.
|
||||
item.update_tree_hash_cache(&mut self.cache)?;
|
||||
|
||||
Ok(())
|
||||
self.cache.update(item)
|
||||
}
|
||||
|
||||
pub fn tree_hash_root(&self) -> Result<Vec<u8>, Error> {
|
||||
|
||||
Reference in New Issue
Block a user