From 5979e13cdc65ea78894dbcab3acde11b246889a7 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Mon, 28 Oct 2024 15:05:38 +0000 Subject: refactor: replace sqlite with lmdb as sqlite is depricated in rust-nostr --- test_utils/src/lib.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'test_utils/src') diff --git a/test_utils/src/lib.rs b/test_utils/src/lib.rs index f329681..57b0643 100644 --- a/test_utils/src/lib.rs +++ b/test_utils/src/lib.rs @@ -11,8 +11,8 @@ use futures::executor::block_on; use git::GitTestRepo; use nostr::{self, nips::nip65::RelayMetadata, Kind, Tag}; use nostr_database::NostrDatabase; +use nostr_lmdb::NostrLMDB; use nostr_sdk::{serde_json, Client, NostrSigner, TagStandard}; -use nostr_sqlite::SQLiteDatabase; use once_cell::sync::Lazy; use rexpect::session::{Options, PtySession}; use strip_ansi_escapes::strip_str; @@ -1051,10 +1051,9 @@ where } /** copied from client.rs */ -async fn get_local_cache_database(git_repo_path: &Path) -> Result { - SQLiteDatabase::open(git_repo_path.join(".git/nostr-cache.sqlite")) - .await - .context("cannot open or create nostr cache database at .git/nostr-cache.sqlite") +async fn get_local_cache_database(git_repo_path: &Path) -> Result { + NostrLMDB::open(git_repo_path.join(".git/nostr-cache.lmdb")) + .context("cannot open or create nostr cache database at .git/nostr-cache.lmdb") } /** copied from client.rs */ @@ -1067,7 +1066,7 @@ pub async fn get_events_from_cache( .query(filters.clone()) .await .context( - "cannot execute query on opened git repo nostr cache database .git/nostr-cache.sqlite", + "cannot execute query on opened git repo nostr cache database .git/nostr-cache.lmdb", ) } -- cgit v1.2.3