Merge branch 'master' into client-api-refact2

This commit is contained in:
NikVolf
2016-07-01 22:43:51 +03:00
38 changed files with 778 additions and 117 deletions

View File

@@ -203,6 +203,7 @@ Database Options:
--db-compaction TYPE Database compaction type. TYPE may be one of:
ssd - suitable for SSDs and fast HDDs;
hdd - suitable for slow HDDs [default: ssd].
--fat-db Fat database.
Import/Export Options:
--from BLOCK Export from block BLOCK, which may be an index or
@@ -362,6 +363,7 @@ pub struct Args {
pub flag_ipcapi: Option<String>,
pub flag_db_cache_size: Option<usize>,
pub flag_db_compaction: String,
pub flag_fat_db: bool,
}
pub fn print_version() {

View File

@@ -333,6 +333,14 @@ impl Configuration {
_ => { die!("Invalid pruning method given."); }
};
if self.args.flag_fat_db {
if let journaldb::Algorithm::Archive = client_config.pruning {
client_config.trie_spec = TrieSpec::Fat;
} else {
die!("Fatdb is not supported. Please rerun with --pruning=archive")
}
}
// forced state db cache size if provided
client_config.db_cache_size = self.args.flag_db_cache_size.and_then(|cs| Some(cs / 4));