Skip to content

Commit 05b3070

Browse files
authored
chore(l1): lower peer_table and initiator INFO messages to DEBUG (#4887)
To avoid some useless spamming of log lines, let's lower the `peer_table` and `initiator` INFO messages to DEBUG
1 parent a97d6f0 commit 05b3070

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

crates/networking/p2p/discv4/peer_table.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use std::{
1717
time::{Duration, Instant},
1818
};
1919
use thiserror::Error;
20-
use tracing::{debug, info};
20+
use tracing::debug;
2121

2222
const MAX_SCORE: i64 = 50;
2323
const MIN_SCORE: i64 = -50;
@@ -597,7 +597,7 @@ impl PeerTableServer {
597597
}
598598

599599
if tried_connections < max_amount {
600-
info!("Resetting list of tried peers.");
600+
debug!("Resetting list of tried peers.");
601601
self.already_tried_peers.clear();
602602
}
603603

@@ -978,7 +978,6 @@ impl GenServer for PeerTableServer {
978978
connection,
979979
capabilities,
980980
} => {
981-
debug!("New peer connected");
982981
let new_peer_id = node.node_id();
983982
let new_peer = PeerData::new(node, None, Some(connection), capabilities);
984983
self.peers.insert(new_peer_id, new_peer);

crates/networking/p2p/rlpx/initiator.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,13 @@ impl RLPxInitiator {
4343

4444
pub async fn spawn(context: P2PContext) {
4545
info!("Starting RLPx Initiator");
46-
4746
let state = RLPxInitiator::new(context);
48-
4947
let mut server = RLPxInitiator::start(state.clone());
50-
5148
let _ = server.cast(InMessage::LookForPeers).await;
5249
}
5350

5451
async fn look_for_peers(&mut self) -> Result<(), RLPxInitiatorError> {
55-
info!("Looking for peers");
56-
52+
debug!("Looking for peers");
5753
if !self.context.table.target_peers_reached().await? {
5854
let contacts = self
5955
.context
@@ -65,7 +61,7 @@ impl RLPxInitiator {
6561
METRICS.record_new_rlpx_conn_attempt().await;
6662
}
6763
} else {
68-
info!("Target peer connections reached, no need to initiate new connections.");
64+
debug!("Target peer connections reached, no need to initiate new connections.");
6965
}
7066
Ok(())
7167
}
@@ -76,7 +72,7 @@ impl RLPxInitiator {
7672
if num_peers < self.target_peers {
7773
self.initial_lookup_interval
7874
} else {
79-
info!("Reached target number of peers. Using longer lookup interval.");
75+
debug!("Reached target number of peers. Using longer lookup interval.");
8076
self.lookup_interval
8177
}
8278
}
@@ -106,7 +102,6 @@ impl GenServer for RLPxInitiator {
106102
match message {
107103
Self::CastMsg::LookForPeers => {
108104
debug!(received = "Look for peers");
109-
110105
let _ = self
111106
.look_for_peers()
112107
.await

0 commit comments

Comments
 (0)