aboutsummaryrefslogtreecommitdiffstats
path: root/trie/encoding.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-02-14 00:23:48 +0800
committerobscuren <geffobscura@gmail.com>2015-02-14 00:23:48 +0800
commit7336dfad02833989037440fb22e01566444d0100 (patch)
tree8f7dc62676e519236b69a977c7af00d81b1e0406 /trie/encoding.go
parentc9985bf563888d5f346408d2ff174167e8b65880 (diff)
parent00fca409398172811e71158e0ca9f6229e0f815b (diff)
downloadgo-tangerine-7336dfad02833989037440fb22e01566444d0100.tar
go-tangerine-7336dfad02833989037440fb22e01566444d0100.tar.gz
go-tangerine-7336dfad02833989037440fb22e01566444d0100.tar.bz2
go-tangerine-7336dfad02833989037440fb22e01566444d0100.tar.lz
go-tangerine-7336dfad02833989037440fb22e01566444d0100.tar.xz
go-tangerine-7336dfad02833989037440fb22e01566444d0100.tar.zst
go-tangerine-7336dfad02833989037440fb22e01566444d0100.zip
Merge branch 'develop' into poc8
Diffstat (limited to 'trie/encoding.go')
-rw-r--r--trie/encoding.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/trie/encoding.go b/trie/encoding.go
index 4906bc90b..5c42c556f 100644
--- a/trie/encoding.go
+++ b/trie/encoding.go
@@ -49,7 +49,7 @@ func CompactDecode(str string) []byte {
func CompactHexDecode(str string) []byte {
base := "0123456789abcdef"
- hexSlice := make([]byte, 0)
+ var hexSlice []byte
enc := hex.EncodeToString([]byte(str))
for _, v := range enc {
@@ -61,7 +61,7 @@ func CompactHexDecode(str string) []byte {
}
func DecodeCompact(key []byte) string {
- base := "0123456789abcdef"
+ const base = "0123456789abcdef"
var str string
for _, v := range key {