mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 12:16:44 +00:00
added lock to dbStore.setCapacity
This commit is contained in:
parent
0e07d1921e
commit
b3ad5bd23e
1 changed files with 3 additions and 0 deletions
|
|
@ -345,6 +345,9 @@ func (s *dbStore) updateAccessCnt(key Key) {
|
|||
|
||||
func (s *dbStore) setCapacity(c uint64) {
|
||||
|
||||
s.lock.Lock()
|
||||
defer s.lock.Unlock()
|
||||
|
||||
s.capacity = c
|
||||
|
||||
if s.entryCnt > c {
|
||||
|
|
|
|||
Loading…
Reference in a new issue