mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-08-03 16:32:10 +02:00
use @mmalmi json string preparsing speedup for duplicate events
- get rid of "nonUnique" variants of subMany as we can now relay on CheckDuplicate to track relays. - add global pool tracker duplicateMiddleware.
This commit is contained in:
@@ -31,6 +31,10 @@ type Subscription struct {
|
||||
// Context will be .Done() when the subscription ends
|
||||
Context context.Context
|
||||
|
||||
// if it is not nil, CheckDuplicate will be called for every event received
|
||||
// if it returns true that event will not be processed further.
|
||||
CheckDuplicate func(id string, relay string) bool
|
||||
|
||||
match func(*Event) bool // this will be either Filters.Match or Filters.MatchIgnoringTimestampConstraints
|
||||
live atomic.Bool
|
||||
eosed atomic.Bool
|
||||
|
Reference in New Issue
Block a user