Merge pull request #1348 from ethcore/db-cache-size
Configurable rocksdb cache size
This commit is contained in:
@@ -141,7 +141,10 @@ impl<V> Client<V> where V: Verifier {
|
||||
let chain = Arc::new(BlockChain::new(config.blockchain, &gb, &path));
|
||||
let tracedb = Arc::new(try!(TraceDB::new(config.tracing, &path, chain.clone())));
|
||||
|
||||
let mut state_db = journaldb::new(&append_path(&path, "state"), config.pruning);
|
||||
let mut state_db = journaldb::new(
|
||||
&append_path(&path, "state"),
|
||||
config.pruning,
|
||||
config.db_cache_size);
|
||||
|
||||
if state_db.is_empty() && spec.ensure_db_good(state_db.as_hashdb_mut()) {
|
||||
state_db.commit(0, &spec.genesis_header().hash(), None).expect("Error commiting genesis state to state DB");
|
||||
|
||||
@@ -35,4 +35,6 @@ pub struct ClientConfig {
|
||||
pub pruning: journaldb::Algorithm,
|
||||
/// The name of the client instance.
|
||||
pub name: String,
|
||||
/// State db cache-size if not default
|
||||
pub db_cache_size: Option<usize>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user