aboutsummaryrefslogtreecommitdiffstats
path: root/trie/hasher.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2017-04-18 19:25:07 +0800
committerFelix Lange <fjl@twurst.com>2017-04-25 08:14:31 +0800
commitf958d7d4822d257598ae36fc3b381040faa5bb30 (patch)
tree332291db0e8e1e7a41699aad291e5f13f35e6385 /trie/hasher.go
parenta31d268b76ff13df8e7d060163a842b8ed569793 (diff)
downloaddexon-f958d7d4822d257598ae36fc3b381040faa5bb30.tar
dexon-f958d7d4822d257598ae36fc3b381040faa5bb30.tar.gz
dexon-f958d7d4822d257598ae36fc3b381040faa5bb30.tar.bz2
dexon-f958d7d4822d257598ae36fc3b381040faa5bb30.tar.lz
dexon-f958d7d4822d257598ae36fc3b381040faa5bb30.tar.xz
dexon-f958d7d4822d257598ae36fc3b381040faa5bb30.tar.zst
dexon-f958d7d4822d257598ae36fc3b381040faa5bb30.zip
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.
Diffstat (limited to 'trie/hasher.go')
-rw-r--r--trie/hasher.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/trie/hasher.go b/trie/hasher.go
index 98c309531..85b6b60f5 100644
--- a/trie/hasher.go
+++ b/trie/hasher.go
@@ -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 {