Skip to content

Commit 1d64990

Browse files
committed
fix noop network api
1 parent 73765dd commit 1d64990

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

crates/net/network-api/src/noop.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use core::{fmt, marker::PhantomData};
77
use std::net::{IpAddr, SocketAddr};
88

99
use crate::{
10-
block::{EthWireBlockListenerProvider, NewBlockWithPeer},
10+
block::{EthWireProvider, NewBlockWithPeer},
1111
events::{NetworkPeersEvents, PeerEventStream},
1212
test_utils::{PeersHandle, PeersHandleProvider},
1313
BlockDownloaderProvider, DiscoveryEvent, NetworkError, NetworkEvent,
@@ -201,12 +201,18 @@ where
201201
}
202202
}
203203

204-
impl<N: NetworkPrimitives> EthWireBlockListenerProvider for NoopNetwork<N> {
205-
type Block = N::Block;
206-
204+
impl<N: NetworkPrimitives> EthWireProvider<N> for NoopNetwork<N> {
207205
async fn eth_wire_block_listener(
208206
&self,
209-
) -> Result<EventStream<NewBlockWithPeer<Self::Block>>, RecvError> {
207+
) -> Result<EventStream<NewBlockWithPeer<N::Block>>, RecvError> {
208+
unreachable!()
209+
}
210+
211+
fn eth_wire_announce_block(
212+
&self,
213+
_block: <N as NetworkPrimitives>::NewBlockPayload,
214+
_hash: alloy_primitives::B256,
215+
) {
210216
unreachable!()
211217
}
212218
}

0 commit comments

Comments
 (0)