mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 14:37:57 +00:00
Database backend (#133)
* DB backend * DB backend * Cleanup * Clean build files after running tests * Fixed comment * add OOM lang item to runtime-io
This commit is contained in:
committed by
Gav Wood
parent
5a56fbcea3
commit
04cbcd0655
@@ -27,6 +27,7 @@ extern crate time;
|
||||
extern crate futures;
|
||||
extern crate tokio_core;
|
||||
extern crate ctrlc;
|
||||
extern crate fdlimit;
|
||||
extern crate ed25519;
|
||||
extern crate triehash;
|
||||
extern crate substrate_codec as codec;
|
||||
@@ -98,6 +99,7 @@ pub fn run<I, T>(args: I) -> error::Result<()> where
|
||||
// TODO [ToDr] Split parameters parsing from actual execution.
|
||||
let log_pattern = matches.value_of("log").unwrap_or("");
|
||||
init_logger(log_pattern);
|
||||
fdlimit::raise_fd_limit();
|
||||
|
||||
let mut config = service::Configuration::default();
|
||||
|
||||
@@ -111,6 +113,8 @@ pub fn run<I, T>(args: I) -> error::Result<()> where
|
||||
.to_string_lossy()
|
||||
.into();
|
||||
|
||||
config.database_path = db_path(&base_path).to_string_lossy().into();
|
||||
|
||||
let mut role = service::Role::FULL;
|
||||
if matches.is_present("collator") {
|
||||
info!("Starting collator.");
|
||||
@@ -204,6 +208,12 @@ fn keystore_path(base_path: &Path) -> PathBuf {
|
||||
path
|
||||
}
|
||||
|
||||
fn db_path(base_path: &Path) -> PathBuf {
|
||||
let mut path = base_path.to_owned();
|
||||
path.push("db");
|
||||
path
|
||||
}
|
||||
|
||||
fn network_path(base_path: &Path) -> PathBuf {
|
||||
let mut path = base_path.to_owned();
|
||||
path.push("network");
|
||||
|
||||
Reference in New Issue
Block a user