Skip to content
This repository was archived by the owner on Oct 23, 2022. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 93d75d7

Browse files
committedFeb 2, 2021
fix: avoid logging Debug of public keys via identify events
1 parent 5ca2d2c commit 93d75d7

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed
 

‎src/p2p/behaviour.rs

+15-1
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,21 @@ impl<Types: IpfsTypes> NetworkBehaviourEventProcess<PingEvent> for Behaviour<Typ
410410

411411
impl<Types: IpfsTypes> NetworkBehaviourEventProcess<IdentifyEvent> for Behaviour<Types> {
412412
fn inject_event(&mut self, event: IdentifyEvent) {
413-
trace!("identify: {:?}", event);
413+
match event {
414+
IdentifyEvent::Received {
415+
peer_id,
416+
observed_addr,
417+
..
418+
} => {
419+
trace!("identify from {} at {}", peer_id, observed_addr);
420+
}
421+
IdentifyEvent::Sent { peer_id } => {
422+
trace!("identify info sent to {}", peer_id);
423+
}
424+
IdentifyEvent::Error { peer_id, error } => {
425+
trace!("identify error with {}: {}", peer_id, error);
426+
}
427+
}
414428
}
415429
}
416430

0 commit comments

Comments
 (0)
This repository has been archived.