Introduce failing test

This commit is contained in:
Paul Hauner
2019-04-22 21:31:39 +10:00
parent 2f69185ccb
commit ec43a4085c
4 changed files with 59 additions and 3 deletions

View File

@@ -85,6 +85,8 @@ pub fn subtree_derive(input: TokenStream) -> TokenStream {
fn update_tree_hash_cache(&self, cache: &mut TreeHashCache) -> Result<(), Error> {
let overlay = BTreeOverlay::new(self, cache.chunk_index)?;
println!("start derive - cache.overlay_index: {}", cache.overlay_index);
// Skip the chunk index to the first leaf node of this struct.
cache.chunk_index = overlay.first_leaf_node();
// Skip the overlay index to the first leaf node of this struct.
@@ -95,6 +97,8 @@ pub fn subtree_derive(input: TokenStream) -> TokenStream {
self.#idents_c.update_tree_hash_cache(cache)?;
)*
println!("end derive - cache.overlay_index: {}", cache.overlay_index);
// Iterate through the internal nodes, updating them if their children have changed.
cache.update_internal_nodes(&overlay)?;