mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 18:32:42 +00:00
Add extra tests, all passing
This commit is contained in:
@@ -5,7 +5,7 @@ where
|
||||
T: CachedTreeHash<T> + TreeHash,
|
||||
{
|
||||
fn new_tree_hash_cache(&self, depth: usize) -> Result<TreeHashCache, Error> {
|
||||
let mut overlay = self.tree_hash_cache_overlay(0, depth)?;
|
||||
let overlay = self.tree_hash_cache_overlay(0, depth)?;
|
||||
|
||||
let mut cache = match T::tree_hash_type() {
|
||||
TreeHashType::Basic => TreeHashCache::from_bytes(
|
||||
|
||||
@@ -183,6 +183,7 @@ impl TreeHashCache {
|
||||
.iter()
|
||||
.skip(overlay_index)
|
||||
.position(|o| o.depth <= depth)
|
||||
.and_then(|i| Some(i + overlay_index))
|
||||
.unwrap_or_else(|| self.overlays.len());
|
||||
|
||||
self.overlays.splice(overlay_index..end, vec![]);
|
||||
|
||||
Reference in New Issue
Block a user