Fix bug with bitfield tree hash caching

This commit is contained in:
Paul Hauner
2019-04-26 17:27:39 +10:00
parent dddcc91ef3
commit d3309b9f7e
3 changed files with 4 additions and 4 deletions

View File

@@ -88,6 +88,7 @@ pub fn subtree_derive(input: TokenStream) -> TokenStream {
fn update_tree_hash_cache(&self, cache: &mut cached_tree_hash::TreeHashCache) -> Result<(), cached_tree_hash::Error> {
let overlay = cached_tree_hash::BTreeOverlay::new(self, cache.chunk_index, 0);
// 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.