trie/bintrie: fix tree key

This commit is contained in:
weiihann 2026-01-28 17:22:33 +08:00
parent 344d01e2be
commit 5518af93d1

View file

@ -51,6 +51,7 @@ func GetBinaryTreeKey(addr common.Address, key []byte) []byte {
hasher.Write(zeroHash[:12])
hasher.Write(addr[:])
hasher.Write(key[:31])
hasher.Write([]byte{0})
k := hasher.Sum(nil)
k[31] = key[31]
return k