Skip to content

Commit

Permalink
Fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
dimartiro committed Jul 4, 2023
1 parent 9a87875 commit 7433fef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/trie/db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ func (mdb *MemoryDB) Get(key []byte) (value []byte, err error) {
if len(key) < common.HashLength {
return nil, fmt.Errorf("expected %d bytes length key, given %d (%x)", common.HashLength, len(key), value)
}
var hash common.Hash
copy(hash[:], key)

if value, found := mdb.data[common.Hash(key)]; found {
if value, found := mdb.data[hash]; found {
return value, nil
}

Expand Down

0 comments on commit 7433fef

Please sign in to comment.