Skip to content

Commit

Permalink
fix(trie): Hash conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
dimartiro committed Jul 28, 2023
1 parent 9c48ffe commit e586fb8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/trie/memorydb/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ func (mdb *MemoryDB) GetWithPrefix(key []byte, prefix hashdb.Prefix) (value []by
return mdb.nullNodeData, nil
}

computatedKey := mdb.keyFunction(common.Hash(key[:]), prefix)
var hash common.Hash
copy(hash[:], key)

computatedKey := mdb.keyFunction(hash, prefix)
return mdb.Get(computatedKey[:])
}

Expand Down

0 comments on commit e586fb8

Please sign in to comment.