diff --git a/crates/net/network/src/fetch/mod.rs b/crates/net/network/src/fetch/mod.rs index 60202a61e3..ddae20619e 100644 --- a/crates/net/network/src/fetch/mod.rs +++ b/crates/net/network/src/fetch/mod.rs @@ -388,10 +388,9 @@ pub(crate) enum BlockResponseOutcome { #[cfg(test)] mod tests { + use super::*; use crate::{peers::PeersManager, PeersConfig}; use reth_primitives::{H256, H512}; - - use super::*; use std::future::poll_fn; #[tokio::test(flavor = "multi_thread")] diff --git a/crates/net/network/src/state.rs b/crates/net/network/src/state.rs index b90c45b7d5..792d993146 100644 --- a/crates/net/network/src/state.rs +++ b/crates/net/network/src/state.rs @@ -355,6 +355,10 @@ where } /// Invoked when received a response from a connected peer. + /// + /// Delegates the response result to the fetcher which may return an outcome specific + /// instruction that needs to be handled in [Self::on_block_response_outcome]. This could be + /// a follow-up request or an instruction to slash the peer's reputation. fn on_eth_response(&mut self, peer: PeerId, resp: PeerResponseResult) -> Option { match resp { PeerResponseResult::BlockHeaders(res) => {