[1.1.0] LMDB Naming consistency fix (#2656)
* allow separate db name in store creation * rustfmt * fixes to db paths to ensure consistency with 1.0.x
This commit is contained in:
+2
-1
@@ -22,6 +22,7 @@ use crate::core::ser::{self, Readable, Reader, Writeable, Writer};
|
||||
use crate::types::{Capabilities, PeerAddr, ReasonForBan};
|
||||
use grin_store::{self, option_to_not_found, to_key, Error};
|
||||
|
||||
const DB_NAME: &'static str = "peer";
|
||||
const STORE_SUBPATH: &'static str = "peers";
|
||||
|
||||
const PEER_PREFIX: u8 = 'P' as u8;
|
||||
@@ -115,7 +116,7 @@ pub struct PeerStore {
|
||||
impl PeerStore {
|
||||
/// Instantiates a new peer store under the provided root path.
|
||||
pub fn new(db_root: &str) -> Result<PeerStore, Error> {
|
||||
let db = grin_store::Store::new(db_root, Some(STORE_SUBPATH), None)?;
|
||||
let db = grin_store::Store::new(db_root, Some(DB_NAME), Some(STORE_SUBPATH), None)?;
|
||||
Ok(PeerStore { db: db })
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user