diff options
author | Felix Lange <fjl@twurst.com> | 2017-04-18 19:25:07 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2017-04-25 08:14:31 +0800 |
commit | f958d7d4822d257598ae36fc3b381040faa5bb30 (patch) | |
tree | 332291db0e8e1e7a41699aad291e5f13f35e6385 /trie/hasher.go | |
parent | a31d268b76ff13df8e7d060163a842b8ed569793 (diff) | |
download | dexon-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.go | 2 |
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 { |