diff --git a/crates/nostr-sdk-db/Cargo.toml b/crates/nostr-sdk-db/Cargo.toml index 36ebc56c1..67915a985 100644 --- a/crates/nostr-sdk-db/Cargo.toml +++ b/crates/nostr-sdk-db/Cargo.toml @@ -16,3 +16,4 @@ async-trait = "0.1" nostr = { version = "0.24", path = "../nostr", default-features = false, features = ["std"] } thiserror = { workspace = true } tokio = { workspace = true, features = ["sync"] } +tracing = { workspace = true, features = ["std"] } diff --git a/crates/nostr-sdk-db/src/lib.rs b/crates/nostr-sdk-db/src/lib.rs index 41bf91ad6..db3af4f07 100644 --- a/crates/nostr-sdk-db/src/lib.rs +++ b/crates/nostr-sdk-db/src/lib.rs @@ -49,9 +49,6 @@ pub trait NostrDatabase: AsyncTraitDeps { /// Return `true` if event was successfully saved into database. async fn save_event(&self, event: &Event) -> Result; - /// Save multiple [`Event`] into store - async fn save_events(&self, events: Vec) -> Result<(), Self::Err>; - /// Check if [`EventId`] has already been seen async fn has_event_already_been_seen(&self, event_id: EventId) -> Result; diff --git a/crates/nostr-sdk-db/src/memory.rs b/crates/nostr-sdk-db/src/memory.rs index 96b86146a..c2b0d2a63 100644 --- a/crates/nostr-sdk-db/src/memory.rs +++ b/crates/nostr-sdk-db/src/memory.rs @@ -143,14 +143,6 @@ impl NostrDatabase for MemoryDatabase { self._save_event(&mut events, event.clone()).await } - async fn save_events(&self, list: Vec) -> Result<(), Self::Err> { - let mut events = self.events.write().await; - for event in list.into_iter() { - self._save_event(&mut events, event).await?; - } - Ok(()) - } - async fn has_event_already_been_seen(&self, event_id: EventId) -> Result { let seen_event_ids = self.seen_event_ids.read().await; Ok(seen_event_ids.contains_key(&event_id))