diff --git a/pool.go b/pool.go index 743f3bd..b5509b7 100644 --- a/pool.go +++ b/pool.go @@ -123,9 +123,9 @@ func (h WithEventMiddleware) ApplyPoolOption(pool *SimplePool) { // WithQueryMiddleware is a function that will be called with every combination of relay+pubkey+kind queried // in a .SubMany*() call -- when applicable (i.e. when the query contains a pubkey and a kind). -type WithQueryMiddleware func(relay string, pubkey string, kind int) +type WithAuthorKindQueryMiddleware func(relay string, pubkey string, kind int) -func (h WithQueryMiddleware) ApplyPoolOption(pool *SimplePool) { +func (h WithAuthorKindQueryMiddleware) ApplyPoolOption(pool *SimplePool) { pool.queryMiddleware = h } @@ -508,7 +508,7 @@ func (pool *SimplePool) CountMany( filter Filter, opts []SubscriptionOption, ) int { - hll := hyperloglog.New(0) // offset is irrelevant here, so we just pass 0 + hll := hyperloglog.New(0) // offset is irrelevant here wg := sync.WaitGroup{} wg.Add(len(urls)) diff --git a/sdk/system.go b/sdk/system.go index dd9847e..a7e592a 100644 --- a/sdk/system.go +++ b/sdk/system.go @@ -106,7 +106,7 @@ func NewSystem(mods ...SystemModifier) *System { } sys.Pool = nostr.NewSimplePool(context.Background(), - nostr.WithQueryMiddleware(sys.TrackQueryAttempts), + nostr.WithAuthorKindQueryMiddleware(sys.TrackQueryAttempts), nostr.WithEventMiddleware(sys.TrackEventHints), nostr.WithPenaltyBox(), )