From 19fa2abf8a1317755342fc534f52d19d10504bb2 Mon Sep 17 00:00:00 2001 From: nk_ysg Date: Thu, 18 Jul 2024 18:26:19 +0800 Subject: [PATCH] chore(reth-network-api): no_std support (#9595) Co-authored-by: Matthias Seitz --- crates/net/network-api/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/net/network-api/src/lib.rs b/crates/net/network-api/src/lib.rs index 8efaec5f0f..1e23390fd1 100644 --- a/crates/net/network-api/src/lib.rs +++ b/crates/net/network-api/src/lib.rs @@ -18,7 +18,6 @@ pub use error::NetworkError; pub use reputation::{Reputation, ReputationChangeKind}; use reth_eth_wire::{capability::Capabilities, DisconnectReason, EthVersion, Status}; use reth_network_peers::NodeRecord; -use serde::{Deserialize, Serialize}; use std::{future::Future, net::SocketAddr, sync::Arc, time::Instant}; /// The `PeerId` type. @@ -246,7 +245,8 @@ impl std::fmt::Display for Direction { } /// The status of the network being ran by the local node. -#[derive(Clone, Debug, Serialize, Deserialize)] +#[derive(Clone, Debug)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct NetworkStatus { /// The local node client version. pub client_version: String,