Skip to content

Commit

Permalink
chore: downgrade debug! to trace! (paradigmxyz#5186)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored and root committed Oct 31, 2023
1 parent 1a1067c commit cfd01bb
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions crates/net/network/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ where
let total_active =
this.num_active_peers.fetch_add(1, Ordering::Relaxed) + 1;
this.metrics.connected_peers.set(total_active as f64);
debug!(
trace!(
target: "net",
?remote_addr,
%client_version,
Expand Down Expand Up @@ -768,7 +768,7 @@ where
.notify(NetworkEvent::SessionClosed { peer_id, reason });
}
SwarmEvent::IncomingPendingSessionClosed { remote_addr, error } => {
debug!(
trace!(
target : "net",
?remote_addr,
?error,
Expand Down
4 changes: 2 additions & 2 deletions crates/net/network/src/peers/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use tokio::{
time::{Instant, Interval},
};
use tokio_stream::wrappers::UnboundedReceiverStream;
use tracing::{debug, info, trace};
use tracing::{info, trace};

/// A communication channel to the [`PeersManager`] to apply manual changes to the peer set.
#[derive(Clone, Debug)]
Expand Down Expand Up @@ -610,7 +610,7 @@ impl PeersManager {
self.queued_actions.push_back(PeerAction::PeerRemoved(peer_id));

if peer.state.is_connected() {
debug!(target : "net::peers", ?peer_id, "disconnecting on remove from discovery");
trace!(target : "net::peers", ?peer_id, "disconnecting on remove from discovery");
// we terminate the active session here, but only remove the peer after the session
// was disconnected, this prevents the case where the session is scheduled for
// disconnect but the node is immediately rediscovered, See also
Expand Down
6 changes: 3 additions & 3 deletions crates/net/network/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use std::{
task::{Context, Poll},
};
use tokio::sync::oneshot;
use tracing::debug;
use tracing::{debug, trace};

/// Cache limit of blocks to keep track of for a single peer.
const PEER_BLOCK_CACHE_LIMIT: usize = 512;
Expand Down Expand Up @@ -259,13 +259,13 @@ where

/// Bans the [`IpAddr`] in the discovery service.
pub(crate) fn ban_ip_discovery(&self, ip: IpAddr) {
debug!(target: "net", ?ip, "Banning discovery");
trace!(target: "net", ?ip, "Banning discovery");
self.discovery.ban_ip(ip)
}

/// Bans the [`PeerId`] and [`IpAddr`] in the discovery service.
pub(crate) fn ban_discovery(&self, peer_id: PeerId, ip: IpAddr) {
debug!(target: "net", ?peer_id, ?ip, "Banning discovery");
trace!(target: "net", ?peer_id, ?ip, "Banning discovery");
self.discovery.ban(peer_id, ip)
}

Expand Down
4 changes: 2 additions & 2 deletions crates/net/network/src/swarm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use std::{
sync::Arc,
task::{Context, Poll},
};
use tracing::{debug, trace};
use tracing::trace;

/// Contains the connectivity related state of the network.
///
Expand Down Expand Up @@ -226,7 +226,7 @@ where
return Some(SwarmEvent::IncomingTcpConnection { session_id, remote_addr })
}
Err(err) => {
debug!(target: "net", ?err, "Incoming connection rejected, capacity already reached.");
trace!(target: "net", ?err, "Incoming connection rejected, capacity already reached.");
self.state_mut()
.peers_mut()
.on_incoming_pending_session_rejected_internally();
Expand Down
6 changes: 3 additions & 3 deletions crates/net/network/src/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use std::{
};
use tokio::sync::{mpsc, oneshot, oneshot::error::RecvError};
use tokio_stream::wrappers::{ReceiverStream, UnboundedReceiverStream};
use tracing::{debug, trace};
use tracing::trace;

/// Cache limit of transactions to keep track of for a single peer.
const PEER_TRANSACTION_CACHE_LIMIT: usize = 1024 * 10;
Expand Down Expand Up @@ -519,7 +519,7 @@ where

if num_already_seen > 0 {
self.metrics.messages_with_already_seen_hashes.increment(1);
debug!(target: "net::tx", num_hashes=%num_already_seen, ?peer_id, client=?peer.client_version, "Peer sent already seen hashes");
trace!(target: "net::tx", num_hashes=%num_already_seen, ?peer_id, client=?peer.client_version, "Peer sent already seen hashes");
}
}

Expand Down Expand Up @@ -698,7 +698,7 @@ where

if num_already_seen > 0 {
self.metrics.messages_with_already_seen_transactions.increment(1);
debug!(target: "net::tx", num_txs=%num_already_seen, ?peer_id, client=?peer.client_version, "Peer sent already seen transactions");
trace!(target: "net::tx", num_txs=%num_already_seen, ?peer_id, client=?peer.client_version, "Peer sent already seen transactions");
}
}

Expand Down

0 comments on commit cfd01bb

Please sign in to comment.