mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
fix comment
This commit is contained in:
parent
2a8615f570
commit
48c3ff7ada
1 changed files with 2 additions and 2 deletions
|
|
@ -77,8 +77,8 @@ func (c *SizeConstrainedCache[K, V]) Add(key K, value V) (evicted bool) {
|
|||
|
||||
// Get looks up a key's value from the cache.
|
||||
func (c *SizeConstrainedCache[K, V]) Get(key K) (V, bool) {
|
||||
c.lock.RLock()
|
||||
defer c.lock.RUnlock()
|
||||
c.lock.Lock()
|
||||
defer c.lock.Unlock()
|
||||
|
||||
return c.lru.Get(key)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue