diff --git a/pbtc/cli.yml b/pbtc/cli.yml index afdb760e..0154b71e 100644 --- a/pbtc/cli.yml +++ b/pbtc/cli.yml @@ -29,9 +29,6 @@ args: - printtoconsole: long: printtoconsole help: Send trace/debug info to console instead of debug.log file - - diskdb: - long: diskdb - help: Use disk storage instead of in-memory one subcommands: - import: about: Import blocks from bitcoin core database diff --git a/pbtc/config.rs b/pbtc/config.rs index fa76b607..0d873ae2 100644 --- a/pbtc/config.rs +++ b/pbtc/config.rs @@ -8,12 +8,10 @@ pub struct Config { pub connect: Option, pub seednode: Option, pub print_to_console: bool, - pub use_disk_database: bool, } pub fn parse(matches: &clap::ArgMatches) -> Result { let print_to_console = matches.is_present("printtoconsole"); - let use_disk_database = matches.is_present("diskdb"); let magic = match (matches.is_present("testnet"), matches.is_present("regtest")) { (true, false) => Magic::Testnet, (false, true) => Magic::Regtest, @@ -47,7 +45,6 @@ pub fn parse(matches: &clap::ArgMatches) -> Result { port: port, connect: connect, seednode: seednode, - use_disk_database: use_disk_database, }; Ok(config) diff --git a/pbtc/util.rs b/pbtc/util.rs index d9fe04bc..23d93bdf 100644 --- a/pbtc/util.rs +++ b/pbtc/util.rs @@ -5,13 +5,9 @@ use chain::RepresentH256; use {db, APP_INFO}; use config::Config; -pub fn open_db(cfg: &Config) -> Arc { - if cfg.use_disk_database { - let db_path = app_dir(AppDataType::UserData, &APP_INFO, "db").expect("Failed to get app dir"); - Arc::new(db::Storage::new(db_path).expect("Failed to open database")) - } else { - Arc::new(db::TestStorage::default()) - } +pub fn open_db(_cfg: &Config) -> Arc { + let db_path = app_dir(AppDataType::UserData, &APP_INFO, "db").expect("Failed to get app dir"); + Arc::new(db::Storage::new(db_path).expect("Failed to open database")) } pub fn node_table_path() -> PathBuf {