shortcut querying when limit == 0

This commit is contained in:
fiatjaf
2023-11-12 09:27:36 -03:00
parent af24bd2132
commit ecb4fc66f8

View File

@@ -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