Skip to content

Commit

Permalink
shortcut querying when limit == 0
Browse files Browse the repository at this point in the history
  • Loading branch information
fiatjaf committed Nov 12, 2023
1 parent af24bd2 commit ecb4fc6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions serve-req.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ func (rl *Relay) handleRequest(ctx context.Context, id string, eose *sync.WaitGr
ovw(ctx, &filter)
}

if filter.Limit == 0 {
return
}

// then check if we'll reject this filter (we apply this after overwriting
// because we may, for example, remove some things from the incoming filters
// that we know we don't support, and then if the end result is an empty
Expand Down

0 comments on commit ecb4fc6

Please sign in to comment.