Refactors parity/parity to use journaldb crate (#6693)

This commit is contained in:
Dmitry Kashitsyn 2017-10-17 11:41:05 +07:00
parent c0fc83988f
commit f9e588dd7b
10 changed files with 10 additions and 8 deletions

1
Cargo.lock generated
View File

@ -1959,6 +1959,7 @@ dependencies = [
"hash 0.1.0",
"ipnetwork 0.12.7 (registry+https://github.com/rust-lang/crates.io-index)",
"isatty 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"journaldb 0.1.0",
"jsonrpc-core 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.8)",
"kvdb 0.1.0",
"kvdb-rocksdb 0.1.0",

View File

@ -62,6 +62,7 @@ hash = { path = "util/hash" }
migration = { path = "util/migration" }
kvdb = { path = "util/kvdb" }
kvdb-rocksdb = { path = "util/kvdb-rocksdb" }
journaldb = { path = "util/journaldb" }
parity-dapps = { path = "dapps", optional = true }
clippy = { version = "0.0.103", optional = true}

View File

@ -17,7 +17,7 @@
use std::fs;
use std::path::{PathBuf, Path};
use bigint::hash::{H64, H256};
use util::journaldb::Algorithm;
use journaldb::Algorithm;
use helpers::{replace_home, replace_home_and_local};
use app_dirs::{AppInfo, get_app_root, AppDataType};

View File

@ -22,7 +22,7 @@ use bigint::prelude::U256;
use bigint::hash::clean_0x;
use util::Address;
use kvdb_rocksdb::CompactionProfile;
use util::journaldb::Algorithm;
use journaldb::Algorithm;
use ethcore::client::{Mode, BlockId, VMType, DatabaseCompactionProfile, ClientConfig, VerifierType};
use ethcore::miner::{PendingSet, GasLimit, PrioritizationStrategy};
use cache::CacheConfig;

View File

@ -76,6 +76,7 @@ extern crate path;
extern crate rpc_cli;
extern crate node_filter;
extern crate hash;
extern crate journaldb;
#[macro_use]
extern crate log as rlog;

View File

@ -20,7 +20,7 @@ use std::io::{Read, Write, Error as IoError, ErrorKind};
use std::path::{Path, PathBuf};
use std::fmt::{Display, Formatter, Error as FmtError};
use std::sync::Arc;
use util::journaldb::Algorithm;
use journaldb::Algorithm;
use migr::{self, Manager as MigrationManager, Config as MigrationConfig, Migration};
use kvdb;
use kvdb_rocksdb::{CompactionProfile, Database, DatabaseConfig};
@ -282,7 +282,6 @@ pub fn migrate(path: &Path, pruning: Algorithm, compaction_profile: CompactionPr
mod legacy {
use super::*;
use std::path::{Path, PathBuf};
use util::journaldb::Algorithm;
use migr::{Manager as MigrationManager};
use kvdb_rocksdb::CompactionProfile;
use ethcore::migrations;

View File

@ -18,7 +18,7 @@ use std::{str, fs, fmt};
use std::time::Duration;
use bigint::prelude::U256;
use util::{Address, version_data};
use util::journaldb::Algorithm;
use journaldb::Algorithm;
use ethcore::spec::{Spec, SpecParams};
use ethcore::ethereum;
use ethcore::client::Mode;

View File

@ -42,7 +42,7 @@ use ansi_term::Colour;
use util::version;
use parking_lot::{Condvar, Mutex};
use node_filter::NodeFilter;
use util::journaldb::Algorithm;
use journaldb::Algorithm;
use params::{
SpecType, Pruning, AccountsConfig, GasPricerConfig, MinerExtras, Switch,

View File

@ -25,7 +25,7 @@ use std::io::{Read, Write};
use std::path::{PathBuf, Path};
use dir::{DatabaseDirectories, default_data_path};
use helpers::replace_home;
use util::journaldb::Algorithm;
use journaldb::Algorithm;
#[cfg_attr(feature="dev", allow(enum_variant_names))]
#[derive(Debug)]

View File

@ -26,7 +26,7 @@ use serde::de::value::MapAccessDeserializer;
use serde_json::Value;
use serde_json::de::from_reader;
use serde_json::ser::to_string;
use util::journaldb::Algorithm;
use journaldb::Algorithm;
use ethcore::client::Mode;
pub struct UserDefaults {