From 925001e1ee27670db07408f4fd4275ff33b2692a Mon Sep 17 00:00:00 2001 From: Roman Krasiuk Date: Tue, 6 Dec 2022 17:39:35 +0200 Subject: [PATCH] move tokio utils to dev dep (#345) --- crates/net/eth-wire/Cargo.toml | 2 +- crates/net/eth-wire/src/lib.rs | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/crates/net/eth-wire/Cargo.toml b/crates/net/eth-wire/Cargo.toml index fcda39c509..d20c83a50d 100644 --- a/crates/net/eth-wire/Cargo.toml +++ b/crates/net/eth-wire/Cargo.toml @@ -22,7 +22,6 @@ ethers-core = { git = "https://github.com/gakonst/ethers-rs", default-features = tokio = { version = "1.21.2", features = ["full"] } futures = "0.3.24" tokio-stream = "0.1.11" -tokio-util = { version = "0.7.4", features = ["io"] } pin-project = "1.0" tracing = "0.1.37" snap = "1.0.5" @@ -32,6 +31,7 @@ smol_str = { version = "0.1", default-features = false } reth-ecies = { path = "../ecies" } ethers-core = { git = "https://github.com/gakonst/ethers-rs", default-features = false } +tokio-util = { version = "0.7.4", features = ["io", "codec"] } hex-literal = "0.3" rand = "0.8" secp256k1 = { version = "0.24.0", features = ["global-context", "rand-std", "recovery"] } diff --git a/crates/net/eth-wire/src/lib.rs b/crates/net/eth-wire/src/lib.rs index 577617b4c0..befcfc2999 100644 --- a/crates/net/eth-wire/src/lib.rs +++ b/crates/net/eth-wire/src/lib.rs @@ -6,9 +6,6 @@ ))] //! Implementation of the `eth` wire protocol. -pub use tokio_util::codec::{ - LengthDelimitedCodec as PassthroughCodec, LengthDelimitedCodecError as PassthroughCodecError, -}; pub mod builder; pub mod capability; mod disconnect; @@ -20,6 +17,11 @@ pub use builder::*; pub mod types; pub use types::*; +#[cfg(test)] +pub use tokio_util::codec::{ + LengthDelimitedCodec as PassthroughCodec, LengthDelimitedCodecError as PassthroughCodecError, +}; + pub use crate::{ disconnect::DisconnectReason, ethstream::{EthStream, UnauthedEthStream, MAX_MESSAGE_SIZE},