We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent feb6620 commit ea06da0Copy full SHA for ea06da0
trie/encoding.go
@@ -53,10 +53,9 @@ func hexToCompact(hex []byte) []byte {
53
54
func compactToHex(compact []byte) []byte {
55
base := keybytesToHex(compact)
56
- base = base[:len(base)-1]
57
- // apply terminator flag
58
- if base[0] >= 2 {
59
- base = append(base, 16)
+ // delete terminator flag
+ if base[0] < 2 {
+ base = base[:len(base)-1]
60
}
61
// apply odd flag
62
chop := 2 - base[0]&1
0 commit comments