aboutsummaryrefslogtreecommitdiffstats
path: root/trie/encoding.go
diff options
context:
space:
mode:
Diffstat (limited to 'trie/encoding.go')
-rw-r--r--trie/encoding.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/trie/encoding.go b/trie/encoding.go
index 5f120de63..1955a3e66 100644
--- a/trie/encoding.go
+++ b/trie/encoding.go
@@ -52,6 +52,9 @@ func hexToCompact(hex []byte) []byte {
}
func compactToHex(compact []byte) []byte {
+ if len(compact) == 0 {
+ return compact
+ }
base := keybytesToHex(compact)
// delete terminator flag
if base[0] < 2 {