diff --git a/Cargo.lock b/Cargo.lock index cf1100a8a4..2721c18241 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5989,26 +5989,19 @@ dependencies = [ name = "reth-interfaces" version = "0.1.0-alpha.13" dependencies = [ - "arbitrary", - "async-trait", "auto_impl", "clap", "futures", - "modular-bitfield", "parking_lot 0.12.1", "rand 0.8.5", - "reth-codecs", - "reth-db", "reth-eth-wire", "reth-network-api", "reth-nippy-jar", "reth-primitives", "reth-rpc-types", - "revm-primitives", "secp256k1 0.27.0", "thiserror", "tokio", - "tokio-stream", "tracing", ] diff --git a/crates/interfaces/Cargo.toml b/crates/interfaces/Cargo.toml index 3071fc5926..58f70059b8 100644 --- a/crates/interfaces/Cargo.toml +++ b/crates/interfaces/Cargo.toml @@ -8,46 +8,37 @@ homepage.workspace = true repository.workspace = true [dependencies] -reth-codecs.workspace = true -reth-nippy-jar.workspace = true reth-primitives.workspace = true +reth-nippy-jar.workspace = true reth-rpc-types.workspace = true reth-network-api.workspace = true # TODO(onbjerg): We only need this for [BlockBody] reth-eth-wire.workspace = true -# eth -revm-primitives.workspace = true - # async -async-trait.workspace = true futures.workspace = true tokio = { workspace = true, features = ["sync"] } -tokio-stream.workspace = true # misc auto_impl = "1.0" thiserror.workspace = true tracing.workspace = true -rand.workspace = true -arbitrary = { workspace = true, features = ["derive"], optional = true } secp256k1 = { workspace = true, default-features = false, features = [ "alloc", "recovery", "rand", ], optional = true } -modular-bitfield = "0.11.2" -parking_lot.workspace = true clap = { workspace = true, features = ["derive"], optional = true } +parking_lot = { workspace = true, optional = true } +rand = { workspace = true, optional = true } [dev-dependencies] -reth-db = { workspace = true, features = ["test-utils"] } +parking_lot.workspace = true +rand.workspace = true tokio = { workspace = true, features = ["full"] } -tokio-stream = { workspace = true, features = ["sync"] } -arbitrary = { workspace = true, features = ["derive"] } secp256k1 = { workspace = true, features = ["alloc", "recovery", "rand"] } [features] -test-utils = ["tokio-stream/sync", "secp256k1", "rand/std_rng"] +test-utils = ["secp256k1", "rand", "parking_lot"] cli = ["clap"] optimism = ["reth-eth-wire/optimism"] diff --git a/crates/interfaces/src/lib.rs b/crates/interfaces/src/lib.rs index c2f4b99d8a..7764bfc790 100644 --- a/crates/interfaces/src/lib.rs +++ b/crates/interfaces/src/lib.rs @@ -9,7 +9,13 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(missing_debug_implementations, missing_docs, unreachable_pub, rustdoc::all)] +#![warn( + missing_debug_implementations, + missing_docs, + unused_crate_dependencies, + unreachable_pub, + rustdoc::all +)] #![deny(unused_must_use, rust_2018_idioms)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/crates/interfaces/src/p2p/full_block.rs b/crates/interfaces/src/p2p/full_block.rs index 0372966579..939da65779 100644 --- a/crates/interfaces/src/p2p/full_block.rs +++ b/crates/interfaces/src/p2p/full_block.rs @@ -36,7 +36,7 @@ impl FullBlockClient { } /// Returns a client with Test consensus - #[cfg(feature = "test-utils")] + #[cfg(any(test, feature = "test-utils"))] pub fn test_client(client: Client) -> Self { Self::new(client, Arc::new(crate::test_utils::TestConsensus::default())) }