From 681cfce4f412958dbb6dc8a1c07408826b4387a0 Mon Sep 17 00:00:00 2001 From: hozan23 Date: Thu, 23 May 2024 13:27:43 +0200 Subject: p2p: add peer pool logs and discovery logs to example/monitor.rs --- p2p/src/discovery/lookup.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'p2p/src/discovery/lookup.rs') diff --git a/p2p/src/discovery/lookup.rs b/p2p/src/discovery/lookup.rs index 613c3cd..4a06083 100644 --- a/p2p/src/discovery/lookup.rs +++ b/p2p/src/discovery/lookup.rs @@ -234,14 +234,12 @@ impl LookupService { ) -> Result> { let conn = self.connector.connect(&endpoint, &peer_id).await?; self.monitor - .notify(DiscoveryEvent::Conn(ConnEvent::Connected(endpoint.clone()))) + .notify(ConnEvent::Connected(endpoint.clone())) .await; let result = self.handle_outbound(conn, target_peer_id).await; - self.monitor - .notify(DiscoveryEvent::Conn(ConnEvent::Disconnected(endpoint))) - .await; + self.monitor.notify(ConnEvent::Disconnected(endpoint)).await; self.outbound_slots.remove().await; result -- cgit v1.2.3