Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
[sync]: remove unused dependencies or make dev (#11061)
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasad1 authored and ordian committed Sep 16, 2019
1 parent 0051c26 commit acad59b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 19 deletions.
4 changes: 0 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 2 additions & 7 deletions ethcore/sync/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,18 @@ authors = ["Parity Technologies <[email protected]>"]
[dependencies]
client-traits = { path = "../client-traits" }
common-types = { path = "../types" }
engine = { path = "../engine" }
enum_primitive = "0.1.1"
ethcore = { path = ".." }
ethcore-io = { path = "../../util/io" }
ethcore-light = { path = "../light" }
ethcore-network = { path = "../../util/network" }
ethcore-network-devp2p = { path = "../../util/network-devp2p" }
ethcore-private-tx = { path = "../private-tx" }
ethereum-types = "0.6.0"
ethkey = { path = "../../accounts/ethkey" }
ethstore = { path = "../../accounts/ethstore" }
fastmap = { path = "../../util/fastmap" }
futures = "0.1"
hash-db = "0.15.0"
keccak-hash = "0.2.0"
keccak-hasher = { path = "../../util/keccak-hasher" }
kvdb = "0.1"
log = "0.4"
machine = { path = "../machine" }
macros = { path = "../../util/macros" }
parity-bytes = "0.1"
parity-runtime = { path = "../../util/runtime" }
Expand All @@ -42,9 +35,11 @@ triehash-ethereum = { version = "0.2", path = "../../util/triehash-ethereum" }

[dev-dependencies]
env_logger = "0.5"
engine = { path = "../engine" }
ethcore = { path = "..", features = ["test-helpers"] }
ethcore-io = { path = "../../util/io", features = ["mio"] }
kvdb-memorydb = "0.1"
machine = { path = "../machine" }
rand_xorshift = "0.1.1"
rustc-hex = "1.0"
spec = { path = "../spec" }
8 changes: 7 additions & 1 deletion ethcore/sync/src/chain/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,17 @@ pub mod random {
use rand;
pub fn new() -> rand::rngs::ThreadRng { rand::thread_rng() }
}

#[cfg(test)]
pub mod random {
use rand::SeedableRng;
use rand_xorshift::XorShiftRng;

const RNG_SEED: [u8; 16] = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16];
pub fn new() -> rand_xorshift::XorShiftRng { rand_xorshift::XorShiftRng::from_seed(RNG_SEED) }

pub fn new() -> XorShiftRng {
XorShiftRng::from_seed(RNG_SEED)
}
}

pub type RlpResponseResult = Result<Option<(PacketId, RlpStream)>, PacketDecodeError>;
Expand Down
12 changes: 5 additions & 7 deletions ethcore/sync/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.

#![warn(missing_docs)]
#![warn(missing_docs, unused_extern_crates)]

//! Blockchain sync module
//! Implements ethereum protocol version 63 as specified here:
Expand All @@ -23,15 +23,13 @@

extern crate client_traits;
extern crate common_types as types;
extern crate ethcore;
extern crate ethcore_io as io;
extern crate ethcore_light as light;
extern crate ethcore_network as network;
extern crate ethcore_network_devp2p as devp2p;
extern crate ethcore_private_tx;
extern crate ethereum_types;
extern crate ethkey;
extern crate ethstore;
extern crate fastmap;
extern crate futures;
extern crate keccak_hash as hash;
Expand All @@ -43,12 +41,13 @@ extern crate rlp;
extern crate snapshot;
extern crate triehash_ethereum;

#[cfg(test)] extern crate engine;
#[cfg(test)] extern crate env_logger;
#[cfg(test)] extern crate ethcore;
#[cfg(test)] extern crate kvdb_memorydb;
#[cfg(test)] extern crate rustc_hex;
#[cfg(test)] extern crate rand_xorshift;
#[cfg(test)] extern crate machine;
#[cfg(test)] extern crate engine;
#[cfg(test)] extern crate rand_xorshift;
#[cfg(test)] extern crate rustc_hex;
#[cfg(test)] extern crate spec;

#[macro_use]
Expand All @@ -58,7 +57,6 @@ extern crate macros;
#[macro_use]
extern crate log;
extern crate parity_util_mem;
extern crate parity_util_mem as mem;
#[macro_use]
extern crate parity_util_mem as malloc_size_of;
#[macro_use]
Expand Down

0 comments on commit acad59b

Please sign in to comment.