trie: rework and document key encoding
'encode' and 'decode' are meaningless because the code deals with three encodings. Document the encodings and give a name to each one.
This commit is contained in:
@ -105,7 +105,7 @@ func (h *hasher) hashChildren(original node, db DatabaseWriter) (node, node, err
|
||||
case *shortNode:
|
||||
// Hash the short node's child, caching the newly hashed subtree
|
||||
collapsed, cached := n.copy(), n.copy()
|
||||
collapsed.Key = compactEncode(n.Key)
|
||||
collapsed.Key = hexToCompact(n.Key)
|
||||
cached.Key = common.CopyBytes(n.Key)
|
||||
|
||||
if _, ok := n.Val.(valueNode); !ok {
|
||||
|
Reference in New Issue
Block a user