aboutsummaryrefslogtreecommitdiffstats
path: root/trie/shortnode.go
diff options
context:
space:
mode:
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) {