diff --git a/storage/badger_queue.go b/storage/badger_queue.go index 2099d943c..03221d547 100644 --- a/storage/badger_queue.go +++ b/storage/badger_queue.go @@ -87,11 +87,6 @@ func (q *Queue) PutCache(ps *PeerSnapshot) error { q.mutex.Lock() defer q.mutex.Unlock() - if q.cacheSet[ps.key] { - return nil - } - q.cacheSet[ps.key] = true - for { put, err := q.cacheRing.Offer(ps) if err != nil || put { @@ -110,7 +105,6 @@ func (q *Queue) PopCache() (*PeerSnapshot, error) { return nil, err } ps := item.(*PeerSnapshot) - delete(q.cacheSet, ps.key) return ps, nil }