Closed jyc228 closed 4 months ago
The recent update focuses on enhancing the copyNode
function in the util.go
file within the trie/zk package. This improvement specifically targets the handling of LeafNode
instances, ensuring that when a LeafNode
is copied, it not only duplicates the node but also creates new valuePreimages
and updates critical attributes like Key
, ValuePreimage
, CompressedFlags
, and `hash.
File | Change Summary |
---|---|
trie/zk/util.go |
Updated the copyNode function to handle LeafNode instances better by creating new valuePreimages and updating fields like Key , ValuePreimage , CompressedFlags , and hash . |
trie/zk/merkle_tree_test.go |
Added a new test function TestCopyNode to verify node copying functionality, ensuring correct creation of shallow copies of leaf nodes and verifying that modifications do not affect the copied node, thus enhancing testing coverage for node copying operations. |
Summary by CodeRabbit