Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Sep 19, 2022
1 parent 270b3e1 commit 2eee028
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion iroh-bitswap/src/behaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,6 @@ impl NetworkBehaviour for Bitswap {

#[instrument(skip(self))]
fn inject_event(&mut self, peer_id: PeerId, connection: ConnectionId, message: HandlerEvent) {
inc!(BitswapMetrics::MessagesReceived);
match message {
HandlerEvent::Connected { protocol } => {
self.with_ledger(peer_id, |state| {
Expand All @@ -528,6 +527,7 @@ impl NetworkBehaviour for Bitswap {
self.known_peers.put(peer_id, Some(protocol));
}
HandlerEvent::Message { mut message } => {
inc!(BitswapMetrics::MessagesReceived);
inc!(BitswapMetrics::Requests);

// Process incoming message.
Expand Down
2 changes: 1 addition & 1 deletion iroh-p2p/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ impl<KeyStorage: Storage> Node<KeyStorage> {
}

if let Some(swarm_event) = self.swarm.next().await {
trace!("tick: swarm event");
trace!("tick: swarm event: {:?}", swarm_event);
if let Err(err) = self.handle_swarm_event(swarm_event).await {
warn!("swarm: {:?}", err);
}
Expand Down

0 comments on commit 2eee028

Please sign in to comment.