From 4b4639014b5a0df2e892435d4cd3b3c8fe276f7b Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 4 Dec 2023 16:49:54 -0600 Subject: [PATCH] Upgrade nostr-relaypool to v0.6.30, disable logging --- src/deps.ts | 2 +- src/pool.ts | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/deps.ts b/src/deps.ts index 8b98e17..dbf3b46 100644 --- a/src/deps.ts +++ b/src/deps.ts @@ -9,7 +9,7 @@ export { } from 'https://deno.land/x/hono@v3.10.1/mod.ts'; export { cors, logger, serveStatic } from 'https://deno.land/x/hono@v3.10.1/middleware.ts'; export { z } from 'https://deno.land/x/zod@v3.21.4/mod.ts'; -export { Author, RelayPool } from 'https://dev.jspm.io/nostr-relaypool@0.6.28'; +export { Author, RelayPool } from 'https://dev.jspm.io/nostr-relaypool@0.6.30'; export { type Event, type EventTemplate, diff --git a/src/pool.ts b/src/pool.ts index 6690cd0..4b8842b 100644 --- a/src/pool.ts +++ b/src/pool.ts @@ -2,7 +2,13 @@ import { getActiveRelays } from '@/db/relays.ts'; import { type Event, RelayPool } from '@/deps.ts'; const allRelays = await getActiveRelays(); -const pool = new RelayPool(allRelays, { skipVerification: true }); + +const pool = new RelayPool(allRelays, { + // The pipeline verifies events. + skipVerification: true, + // The logging feature overwhelms the CPU and creates too many logs. + logErrorsAndNotices: false, +}); /** Publish an event to the given relays, or the entire pool. */ function publish(event: Event, relays: string[] = allRelays) {