Skip to content

Commit

Permalink
badger: no need do manual exhaustion of further iterator on phase tra…
Browse files Browse the repository at this point in the history
…nsition, it will be done in the loop below.
  • Loading branch information
fiatjaf committed Oct 1, 2024
1 parent a02e403 commit f32393f
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions badger/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,6 @@ func (b BadgerBackend) QueryEvents(ctx context.Context, filter nostr.Filter) (ch
} else if totalPulled >= limit {
// fmt.Println("have enough!")

// once we reached the limit we will stop fetching from the iterator that has gone further
// we just mark it as exhausted so we will never try it again
exhausted[furtherIter] = true
remainingUnexhausted--

// we will exclude this oldest number as it is not relevant anymore
// (we now want to keep track only of the oldest among the remaining iterators)
furtherEvent = nil
Expand Down

0 comments on commit f32393f

Please sign in to comment.