Merge pull request #6801 from paritytech/refactoring/journal-6693
Refactors journaldb as a separate crate
This commit is contained in:
@@ -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};
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
@@ -326,7 +326,7 @@ pub fn mode_switch_to_bool(switch: Option<Mode>, user_defaults: &UserDefaults) -
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use util::journaldb::Algorithm;
|
||||
use journaldb::Algorithm;
|
||||
use user_defaults::UserDefaults;
|
||||
use super::{SpecType, Pruning, ResealPolicy, Switch, tracing_switch_to_bool};
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)]
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user