We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d5030b3 commit f49bb8eCopy full SHA for f49bb8e
1 file changed
indexer/beacon/epochcache.go
@@ -248,7 +248,7 @@ func (cache *epochCache) removeUnreferencedEpochStates() uint64 {
248
defer cache.cacheMutex.Unlock()
249
250
removed := uint64(0)
251
- for _, state := range cache.stateMap {
+ for root, state := range cache.stateMap {
252
found := false
253
for _, stats := range cache.statsMap {
254
if stats.dependentState == state {
@@ -259,7 +259,7 @@ func (cache *epochCache) removeUnreferencedEpochStates() uint64 {
259
260
if !found {
261
state.dispose()
262
- delete(cache.stateMap, state.slotRoot)
+ delete(cache.stateMap, root)
263
removed++
264
}
265
0 commit comments