Skip to content

Commit

Permalink
fix: 13610: Backport the fix for 13584 to 0.50 (#13611)
Browse files Browse the repository at this point in the history
Signed-off-by: Artem Ananev <[email protected]>
  • Loading branch information
artemananiev authored May 30, 2024
1 parent adfd95d commit 7b5f2b6
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1316,13 +1316,15 @@ public void onNodeHashed(final long path, final Hash hash) {
virtualHash = (rootHash != null) ? rootHash : hasher.emptyRootHash();
}

// There are no remaining changes to be made to the cache, so we can seal it.
cache.seal();

// Make sure the copy is marked as hashed after the cache is sealed, otherwise the chances
// are an attempt to merge the cache will fail because the cache hasn't been sealed yet
setHashPrivate(virtualHash);

final long end = System.currentTimeMillis();
statistics.recordHash(end - start);

// There are no remaining changes to be made to the cache, so we can seal it.
cache.seal();
}

/*
Expand Down

0 comments on commit 7b5f2b6

Please sign in to comment.