diff --git a/crates/net/eth-wire-types/Cargo.toml b/crates/net/eth-wire-types/Cargo.toml index 245643569d2..b54462010e8 100644 --- a/crates/net/eth-wire-types/Cargo.toml +++ b/crates/net/eth-wire-types/Cargo.toml @@ -40,7 +40,6 @@ proptest-derive.workspace = true rand.workspace = true [features] -default = ["serde"] arbitrary = [ "reth-primitives/arbitrary", "dep:arbitrary", diff --git a/crates/net/eth-wire-types/src/header.rs b/crates/net/eth-wire-types/src/header.rs index c9589527b34..f6b3b8ac4cd 100644 --- a/crates/net/eth-wire-types/src/header.rs +++ b/crates/net/eth-wire-types/src/header.rs @@ -3,7 +3,6 @@ use alloy_rlp::{Decodable, Encodable}; use bytes::BufMut; use reth_codecs::derive_arbitrary; -use serde::{Deserialize, Serialize}; /// Represents the direction for a headers request depending on the `reverse` field of the request. /// > The response must contain a number of block headers, of rising number when reverse is 0, @@ -16,7 +15,8 @@ use serde::{Deserialize, Serialize}; /// /// See also #[derive_arbitrary(rlp)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash, Default, Serialize, Deserialize)] +#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash, Default)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub enum HeadersDirection { /// Falling block number. Falling, diff --git a/crates/net/eth-wire/Cargo.toml b/crates/net/eth-wire/Cargo.toml index 1190a411dad..7caa906b622 100644 --- a/crates/net/eth-wire/Cargo.toml +++ b/crates/net/eth-wire/Cargo.toml @@ -59,14 +59,14 @@ proptest.workspace = true proptest-arbitrary-interop.workspace = true proptest-derive.workspace = true async-stream.workspace = true +serde.workspace = true [features] -default = ["serde"] arbitrary = [ "reth-primitives/arbitrary", "dep:arbitrary", ] -serde = ["dep:serde"] +serde = ["dep:serde", "reth-eth-wire-types/serde"] [[test]] name = "fuzz_roundtrip"