Style
This commit is contained in:
parent
d0c80a6903
commit
c7b359fcee
@ -173,7 +173,6 @@ impl Client {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let trie_factory = TrieFactory::new(trie_spec);
|
let trie_factory = TrieFactory::new(trie_spec);
|
||||||
|
|
||||||
let journal_db = journaldb::new(db.clone(), config.pruning, ::db::COL_STATE);
|
let journal_db = journaldb::new(db.clone(), config.pruning, ::db::COL_STATE);
|
||||||
let mut state_db = StateDB::new(journal_db, config.state_cache_size);
|
let mut state_db = StateDB::new(journal_db, config.state_cache_size);
|
||||||
if state_db.journal_db().is_empty() && try!(spec.ensure_db_good(&mut state_db, &trie_factory)) {
|
if state_db.journal_db().is_empty() && try!(spec.ensure_db_good(&mut state_db, &trie_factory)) {
|
||||||
|
@ -335,19 +335,18 @@ fn start_client(
|
|||||||
let client_config = to_client_config(&cache_config, Mode::Active, tracing, fat_db, compaction, wal, VMType::default(), "".into(), algorithm, pruning_history, true);
|
let client_config = to_client_config(&cache_config, Mode::Active, tracing, fat_db, compaction, wal, VMType::default(), "".into(), algorithm, pruning_history, true);
|
||||||
|
|
||||||
let service = try!(ClientService::start(
|
let service = try!(ClientService::start(
|
||||||
client_config,
|
client_config,
|
||||||
&spec,
|
&spec,
|
||||||
&client_path,
|
&client_path,
|
||||||
&snapshot_path,
|
&snapshot_path,
|
||||||
&dirs.ipc_path(),
|
&dirs.ipc_path(),
|
||||||
Arc::new(Miner::with_spec(&spec)),
|
Arc::new(Miner::with_spec(&spec)),
|
||||||
).map_err(|e| format!("Client service error: {:?}", e)));
|
).map_err(|e| format!("Client service error: {:?}", e)));
|
||||||
|
|
||||||
drop(spec);
|
drop(spec);
|
||||||
Ok(service)
|
Ok(service)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn execute_export(cmd: ExportBlockchain) -> Result<String, String> {
|
fn execute_export(cmd: ExportBlockchain) -> Result<String, String> {
|
||||||
// Setup panic handler
|
// Setup panic handler
|
||||||
let service = try!(start_client(cmd.dirs, cmd.spec, cmd.pruning, cmd.pruning_history, cmd.tracing, cmd.fat_db, cmd.compaction, cmd.wal, cmd.cache_config));
|
let service = try!(start_client(cmd.dirs, cmd.spec, cmd.pruning, cmd.pruning_history, cmd.tracing, cmd.fat_db, cmd.compaction, cmd.wal, cmd.cache_config));
|
||||||
|
@ -304,14 +304,13 @@ impl<'a> TrieDBIterator<'a> {
|
|||||||
status: Status::At,
|
status: Status::At,
|
||||||
node: Node::decoded(node),
|
node: Node::decoded(node),
|
||||||
});
|
});
|
||||||
self.key_nibbles.extend(slice.iter());
|
|
||||||
} else {
|
} else {
|
||||||
self.trail.push(Crumb {
|
self.trail.push(Crumb {
|
||||||
status: Status::Exiting,
|
status: Status::Exiting,
|
||||||
node: Node::decoded(node),
|
node: Node::decoded(node),
|
||||||
});
|
});
|
||||||
self.key_nibbles.extend(slice.iter());
|
|
||||||
}
|
}
|
||||||
|
self.key_nibbles.extend(slice.iter());
|
||||||
Ok(())
|
Ok(())
|
||||||
},
|
},
|
||||||
Node::Extension(ref slice, ref item) => {
|
Node::Extension(ref slice, ref item) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user