Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions crates/networking/p2p/discv4/peer_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use std::{
time::{Duration, Instant},
};
use thiserror::Error;
use tracing::{debug, info};
use tracing::debug;

const MAX_SCORE: i64 = 50;
const MIN_SCORE: i64 = -50;
Expand Down Expand Up @@ -597,7 +597,7 @@ impl PeerTableServer {
}

if tried_connections < max_amount {
info!("Resetting list of tried peers.");
debug!("Resetting list of tried peers.");
self.already_tried_peers.clear();
}

Expand Down Expand Up @@ -978,7 +978,6 @@ impl GenServer for PeerTableServer {
connection,
capabilities,
} => {
debug!("New peer connected");
let new_peer_id = node.node_id();
let new_peer = PeerData::new(node, None, Some(connection), capabilities);
self.peers.insert(new_peer_id, new_peer);
Expand Down
11 changes: 3 additions & 8 deletions crates/networking/p2p/rlpx/initiator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,13 @@ impl RLPxInitiator {

pub async fn spawn(context: P2PContext) {
info!("Starting RLPx Initiator");

let state = RLPxInitiator::new(context);

let mut server = RLPxInitiator::start(state.clone());

let _ = server.cast(InMessage::LookForPeers).await;
}

async fn look_for_peers(&mut self) -> Result<(), RLPxInitiatorError> {
info!("Looking for peers");

debug!("Looking for peers");
if !self.context.table.target_peers_reached().await? {
let contacts = self
.context
Expand All @@ -65,7 +61,7 @@ impl RLPxInitiator {
METRICS.record_new_rlpx_conn_attempt().await;
}
} else {
info!("Target peer connections reached, no need to initiate new connections.");
debug!("Target peer connections reached, no need to initiate new connections.");
}
Ok(())
}
Expand All @@ -76,7 +72,7 @@ impl RLPxInitiator {
if num_peers < self.target_peers {
self.initial_lookup_interval
} else {
info!("Reached target number of peers. Using longer lookup interval.");
debug!("Reached target number of peers. Using longer lookup interval.");
self.lookup_interval
}
}
Expand Down Expand Up @@ -106,7 +102,6 @@ impl GenServer for RLPxInitiator {
match message {
Self::CastMsg::LookForPeers => {
debug!(received = "Look for peers");

let _ = self
.look_for_peers()
.await
Expand Down