From 4df61c0c59379f47d1bb38e566f966b8ef1678cf Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 19 Oct 2024 20:55:09 -0500 Subject: [PATCH] pipeline: remove "event already in database" check --- src/pipeline.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/pipeline.ts b/src/pipeline.ts index 57a5f76a..867f2c22 100644 --- a/src/pipeline.ts +++ b/src/pipeline.ts @@ -40,7 +40,6 @@ async function handleEvent(event: DittoEvent, signal: AbortSignal): Promise ${event.id}`); pipelineEventsCounter.inc({ kind: event.kind }); @@ -111,13 +110,6 @@ function encounterEvent(event: NostrEvent): boolean { return encountered; } -/** Check if the event already exists in the database. */ -async function existsInDB(event: DittoEvent): Promise { - const store = await Storages.db(); - const events = await store.query([{ ids: [event.id], limit: 1 }]); - return events.length > 0; -} - /** Check whether the event has a NIP-70 `-` tag. */ function isProtectedEvent(event: NostrEvent): boolean { return event.tags.some(([name]) => name === '-');