Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
  • Loading branch information
fgimenez and emhane committed May 20, 2024
1 parent f463cce commit 77df31b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/net/network/src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ pub(crate) enum NetworkHandleMessage {
/// Disconnects a connection to a peer if it exists, optionally providing a disconnect reason.
DisconnectPeer(PeerId, Option<DisconnectReason>),
/// Adds a new listener for `NetworkEvent`.
EventListener(Sender<NetworkEvent>),
EventListener(broadcast::Sender<NetworkEvent>),
/// Broadcasts an event to announce a new block to all nodes.
AnnounceBlock(NewBlock, B256),
/// Sends a list of transactions to the given peer.
Expand Down
3 changes: 1 addition & 2 deletions crates/rpc/rpc-builder/tests/it/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ pub fn test_address() -> SocketAddr {
pub async fn launch_auth(secret: JwtSecret) -> AuthServerHandle {
let config = AuthServerConfig::builder(secret).socket_addr(test_address()).build();
let (tx, _rx) = unbounded_channel();
let listeners: EventListeners<BeaconConsensusEngineEvent> = Default::default();
let beacon_engine_handle = BeaconConsensusEngineHandle::<EthEngineTypes>::new(tx, listeners);
let beacon_engine_handle = BeaconConsensusEngineHandle::<EthEngineTypes>::new(tx, Default::default());
let engine_api = EngineApi::new(
NoopProvider::default(),
MAINNET.clone(),
Expand Down
2 changes: 1 addition & 1 deletion crates/tokio-util/src/event_listeners.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use tokio::sync::broadcast::{self, Sender};
use tokio_stream::wrappers::BroadcastStream;
use tracing::{error, warn};

const DEFAULT_BROADCAST_CHANNEL_SIZE: usize = 1000;
const DEFAULT_SIZE_BROADCAST_CHANNEL: usize = 1000;

/// A bounded broadcast channel for a task.
#[derive(Debug)]
Expand Down

0 comments on commit 77df31b

Please sign in to comment.