why were we recreating the pool?

This commit is contained in:
fiatjaf
2026-04-18 11:13:08 -03:00
parent 07b791e90a
commit d3f4548dbd
2 changed files with 5 additions and 16 deletions

12
main.go
View File

@@ -103,13 +103,11 @@ var app = &cli.Command{
setupLocalDatabases(c, sys)
sys.Pool = nostr.NewPool(nostr.PoolOptions{
AuthorKindQueryMiddleware: sys.TrackQueryAttempts,
EventMiddleware: sys.TrackEventHints,
RelayOptions: nostr.RelayOptions{
RequestHeader: http.Header{textproto.CanonicalMIMEHeaderKey("user-agent"): {"nak/b"}},
},
})
sys.Pool.QueryMiddleware = sys.TrackQueryAttempts
sys.Pool.EventMiddleware = sys.TrackEventHints
sys.Pool.RelayOptions = nostr.RelayOptions{
RequestHeader: http.Header{textproto.CanonicalMIMEHeaderKey("user-agent"): {"nak/b"}},
}
return ctx, nil
},