Further tidy cached tree hash

This commit is contained in:
Paul Hauner
2019-04-15 12:01:12 +10:00
parent c18cdf2abf
commit 8e5b79452a
5 changed files with 214 additions and 213 deletions

View File

@@ -40,15 +40,15 @@ pub enum ItemType {
pub trait CachedTreeHash<Item>: Debug {
fn item_type() -> ItemType;
fn build_tree_hash_cache(&self) -> Result<TreeHashCache, Error>;
fn btree_overlay(&self, chunk_offset: usize) -> Result<BTreeOverlay, Error>;
fn packed_encoding(&self) -> Result<Vec<u8>, Error>;
fn packing_factor() -> usize;
fn cached_hash_tree_root(
fn new_cache(&self) -> Result<TreeHashCache, Error>;
fn update_cache(
&self,
other: &Item,
cache: &mut TreeHashCache,