Skip to content

Commit

Permalink
chore: logging identify ops more accurately
Browse files Browse the repository at this point in the history
  • Loading branch information
maqi authored and joshuef committed Nov 29, 2023
1 parent aeed0a1 commit abb32a6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sn_networking/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,10 @@ impl SwarmDriver {
.collect(),
};

trace!(%peer_id, ?addrs, "identify: attempting to add addresses to routing table");

// Attempt to add the addresses to the routing table.
for multiaddr in &addrs {
trace!(%peer_id, ?addrs, "identify: attempting to add addresses to routing table");

let _routing_update = self
.swarm
.behaviour_mut()
Expand All @@ -286,6 +286,7 @@ impl SwarmDriver {
let a = &mut self.swarm.behaviour_mut().autonat;
// It could be that we are on a local network and have AutoNAT disabled.
if let Some(autonat) = a.as_mut() {
trace!(%peer_id, ?addrs, "identify: attempting to add peer as server");
for multiaddr in addrs {
autonat.add_server(peer_id, Some(multiaddr));
}
Expand Down

0 comments on commit abb32a6

Please sign in to comment.