Skip to content

Commit

Permalink
fix after review
Browse files Browse the repository at this point in the history
  • Loading branch information
sstanculeanu committed Sep 18, 2023
1 parent 781f223 commit b4421cd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions txcache/baseTxCache.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ func (cache *baseTxCache) RegisterEvictionHandler(handler func(hash []byte)) err
// notifyEvictionHandlers will be called on a separate go routine
func (cache *baseTxCache) notifyEvictionHandlers(txHashes [][]byte) {
cache.mutEvictionHandlers.RLock()
for _, handler := range cache.evictionHandlers {
handlers := cache.evictionHandlers
cache.mutEvictionHandlers.RUnlock()

for _, handler := range handlers {
for _, txHash := range txHashes {
handler(txHash)
}
}
cache.mutEvictionHandlers.RUnlock()
}

0 comments on commit b4421cd

Please sign in to comment.