delay freeze of status_cache until squash (#3503)

This commit is contained in:
Rob Walker
2019-03-26 11:37:38 -07:00
committed by GitHub
parent 93cea4c86c
commit fabb6d2092

View File

@ -304,7 +304,11 @@ impl Bank {
let parent_caches: Vec<_> = parents let parent_caches: Vec<_> = parents
.iter() .iter()
.map(|b| b.status_cache.read().unwrap()) .map(|p| {
let mut parent = p.status_cache.write().unwrap();
parent.freeze();
parent
})
.collect(); .collect();
self.status_cache.write().unwrap().squash(&parent_caches); self.status_cache.write().unwrap().squash(&parent_caches);
} }