From 7d26232b532c3947418d792b7ab9520af72e4e58 Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Fri, 13 Apr 2018 22:58:54 +0300 Subject: [PATCH] Use a constant for DB path --- src/bin/index_server.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bin/index_server.rs b/src/bin/index_server.rs index 7c2bd3f..284bc1f 100644 --- a/src/bin/index_server.rs +++ b/src/bin/index_server.rs @@ -23,12 +23,14 @@ fn setup_logging() { ]).unwrap(); } +const DB_PATH: &str = "db/mainnet"; + fn run_server() { let waiter = waiter::Waiter::new("tcp://localhost:28332"); let daemon = daemon::Daemon::new("http://localhost:8332"); { let mut store = store::Store::open( - "db/mainnet", + DB_PATH, store::StoreOptions { auto_compact: false, }, @@ -37,7 +39,7 @@ fn run_server() { store.compact_if_needed(); } - let mut store = store::Store::open("db/mainnet", store::StoreOptions { auto_compact: true }); + let mut store = store::Store::open(DB_PATH, store::StoreOptions { auto_compact: true }); loop { if store.read_header(&waiter.wait()).is_some() { continue;