From a458153098d6f66ee0c6f990f31b3646ad171bbb Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Sat, 16 Feb 2019 16:16:12 +0100 Subject: trie: fix error in node decoding (#19111) --- trie/encoding.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'trie/encoding.go') 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 { -- cgit v1.2.3