diff --git a/common/db/src/lib.rs b/common/db/src/lib.rs index 447542177..1c08fe3dc 100644 --- a/common/db/src/lib.rs +++ b/common/db/src/lib.rs @@ -9,9 +9,9 @@ mod rocks; #[cfg(feature = "rocksdb")] pub use rocks::{RocksDB, new_rocksdb}; -#[cfg(feature = "parity_db")] +#[cfg(feature = "parity-db")] mod parity_db; -#[cfg(feature = "parity_db")] +#[cfg(feature = "parity-db")] pub use parity_db::{ParityDb, new_parity_db}; /// An object implementing get. diff --git a/common/db/src/parity_db.rs b/common/db/src/parity_db.rs index 217482846..9859d4b8f 100644 --- a/common/db/src/parity_db.rs +++ b/common/db/src/parity_db.rs @@ -1,7 +1,6 @@ use std::sync::Arc; -pub use ::parity_db::Db as ParityDb; -use ::redb::*; +pub use ::parity_db::{Options, Db as ParityDb}; use crate::*; @@ -37,5 +36,5 @@ impl Db for Arc { } pub fn new_parity_db(path: &str) -> Arc { - Arc::new(ParityDb::open_or_crate(Options::with_columns(path, 1)).unwrap()) + Arc::new(ParityDb::open_or_create(&Options::with_columns(std::path::Path::new(path), 1)).unwrap()) } diff --git a/message-queue/src/main.rs b/message-queue/src/main.rs index bc96d6e80..25a36edfd 100644 --- a/message-queue/src/main.rs +++ b/message-queue/src/main.rs @@ -23,7 +23,7 @@ pub(crate) use crate::messages::*; pub(crate) use crate::queue::Queue; #[cfg(all(feature = "parity-db", not(feature = "rocksdb")))] -pub(crate) type Db = Arc; +pub(crate) type Db = Arc; #[cfg(feature = "rocksdb")] pub(crate) type Db = serai_db::RocksDB;