trie: rename TrieSync to Sync and improve hexToKeybytes (#16804)
This removes a golint warning: type name will be used as trie.TrieSync by other packages, and that stutters; consider calling this Sync. In hexToKeybytes len(hex) is even and (even+1)/2 == even/2, remove the +1.
This commit is contained in:
committed by
Felix Lange
parent
d51faee240
commit
38c7eb0f26
@ -83,7 +83,7 @@ func hexToKeybytes(hex []byte) []byte {
|
||||
if len(hex)&1 != 0 {
|
||||
panic("can't convert hex key of odd length")
|
||||
}
|
||||
key := make([]byte, (len(hex)+1)/2)
|
||||
key := make([]byte, len(hex)/2)
|
||||
decodeNibbles(hex, key)
|
||||
return key
|
||||
}
|
||||
|
Reference in New Issue
Block a user