Skip to content

Commit 6a6bc05

Browse files
author
info@weblogix.biz
committed
Merge remote-tracking branch 'origin/main' into jklondon/caplintypesnotnil
2 parents 41235d6 + de9398b commit 6a6bc05

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

db/state/cache.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ type u128 struct{ hi, lo uint64 } //nolint
1919
type u192 struct{ hi, lo, ext uint64 } //nolint
2020

2121
type DomainGetFromFileCache struct {
22-
sync.RWMutex
2322
*freelru.LRU[uint64, domainGetFromFileCacheItem]
2423
enabled, trace bool
2524
limit uint32
@@ -45,25 +44,11 @@ func NewDomainGetFromFileCache(limit uint32) *DomainGetFromFileCache {
4544
return &DomainGetFromFileCache{LRU: c, enabled: domainGetFromFileCacheEnabled, trace: domainGetFromFileCacheTrace, limit: limit}
4645
}
4746

48-
func (c *DomainGetFromFileCache) Add(key uint64, value domainGetFromFileCacheItem) (evicted bool) {
49-
c.Lock()
50-
defer c.Unlock()
51-
return c.LRU.Add(key, value)
52-
}
53-
54-
func (c *DomainGetFromFileCache) Get(key uint64) (value domainGetFromFileCacheItem, ok bool) {
55-
c.Lock() // get upates cache vars
56-
defer c.Unlock()
57-
return c.LRU.Get(key)
58-
}
59-
6047
func (c *DomainGetFromFileCache) SetTrace(v bool) { c.trace = v }
6148
func (c *DomainGetFromFileCache) LogStats(dt kv.Domain) {
6249
if c == nil {
6350
return
6451
}
65-
c.RLock()
66-
defer c.RUnlock()
6752
if !c.enabled || !c.trace {
6853
return
6954
}

0 commit comments

Comments
 (0)