Skip to content

Commit

Permalink
use HasGet
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-ogrady committed Nov 2, 2022
1 parent 6bb9d01 commit 5026630
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trie/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ func (db *Database) EncodedNode(h common.Hash) node {
func (db *Database) node(hash common.Hash) ([]byte, *cachedNode, error) {
// Retrieve the node from the clean cache if available
if db.cleans != nil {
if enc := db.cleans.Get(nil, hash[:]); enc != nil {
if enc, found := db.cleans.HasGet(nil, hash[:]); found {
memcacheCleanHitMeter.Mark(1)
memcacheCleanReadMeter.Mark(int64(len(enc)))
return enc, nil, nil
Expand Down

0 comments on commit 5026630

Please sign in to comment.