From 8d0afc1f126954cd720c674832cd38393ab8afd6 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Fri, 5 Jan 2024 20:48:44 -0300 Subject: [PATCH] invalidated filters just return nothing instead of erroring. --- responding.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/responding.go b/responding.go index 2ec5c03..6a59a60 100644 --- a/responding.go +++ b/responding.go @@ -18,7 +18,9 @@ func (rl *Relay) handleRequest(ctx context.Context, id string, eose *sync.WaitGr } if filter.Limit < 0 { - return errors.New("blocked: filter invalidated") + // this is a special situation through which the implementor signals to us that it doesn't want + // to event perform any queries whatsoever + return nil } // then check if we'll reject this filter (we apply this after overwriting