Currently, there is a MerkleTrieExtensions.DifferentNodes() static public method that compares two different tries. But it is too slow because it looks up all states and then compares states. Since it is a Merkle-tree data structure, it can skip traversal if HashNode is the same.
Currently, there is a
MerkleTrieExtensions.DifferentNodes()
static public method that compares two different tries. But it is too slow because it looks up all states and then compares states. Since it is a Merkle-tree data structure, it can skip traversal ifHashNode
is the same.https://github.com/planetarium/libplanet/blob/c4191c2dd3df5a888173120792073cde01bdd894/Libplanet.Store/Trie/MerkleTrieExtensions.cs