aboutsummaryrefslogtreecommitdiffstats
path: root/trie/shortnode.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-08-06 23:44:19 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-08-06 23:44:19 +0800
commit7baa5977c8c4b1608c2a23615143da414a638b5c (patch)
tree96911d3cf503bafae5b7b5ffd06245766912950e /trie/shortnode.go
parent82ef26f6007986debd6ce082f57050f0c7e36006 (diff)
parentc1d516546d221de898ddeb12a77477d992d125df (diff)
downloaddexon-7baa5977c8c4b1608c2a23615143da414a638b5c.tar
dexon-7baa5977c8c4b1608c2a23615143da414a638b5c.tar.gz
dexon-7baa5977c8c4b1608c2a23615143da414a638b5c.tar.bz2
dexon-7baa5977c8c4b1608c2a23615143da414a638b5c.tar.lz
dexon-7baa5977c8c4b1608c2a23615143da414a638b5c.tar.xz
dexon-7baa5977c8c4b1608c2a23615143da414a638b5c.tar.zst
dexon-7baa5977c8c4b1608c2a23615143da414a638b5c.zip
Merge pull request #1594 from ebuchman/trie_hex_fix
faster hex-prefix codec and string -> []byte
Diffstat (limited to 'trie/shortnode.go')
-rw-r--r--trie/shortnode.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/trie/shortnode.go b/trie/shortnode.go
index b5fc6d1f9..569d5f109 100644
--- a/trie/shortnode.go
+++ b/trie/shortnode.go
@@ -26,7 +26,7 @@ type ShortNode struct {
}
func NewShortNode(t *Trie, key []byte, value Node) *ShortNode {
- return &ShortNode{t, []byte(CompactEncode(key)), value, false}
+ return &ShortNode{t, CompactEncode(key), value, false}
}
func (self *ShortNode) Value() Node {
self.value = self.trie.trans(self.value)
@@ -49,7 +49,7 @@ func (self *ShortNode) Hash() interface{} {
}
func (self *ShortNode) Key() []byte {
- return CompactDecode(string(self.key))
+ return CompactDecode(self.key)
}
func (self *ShortNode) setDirty(dirty bool) {