diff --git a/node/network/src/types/topics.rs b/node/network/src/types/topics.rs index 772d387..a4fc80b 100644 --- a/node/network/src/types/topics.rs +++ b/node/network/src/types/topics.rs @@ -15,12 +15,12 @@ pub const ANNOUNCE_FILE_TOPIC: &str = "announce_file"; pub const ANNOUNCE_CHUNKS_TOPIC: &str = "announce_chunks"; pub const ANNOUNCE_SHARD_CONFIG_TOPIC: &str = "announce_shard_config"; -pub const CORE_TOPICS: [GossipKind; 1] = [ +pub const CORE_TOPICS: [GossipKind; 5] = [ GossipKind::NewFile, - // GossipKind::FindFile, - // GossipKind::FindChunks, - // GossipKind::AnnounceFile, - // GossipKind::AnnounceChunks, + GossipKind::FindFile, + GossipKind::FindChunks, + GossipKind::AnnounceFile, + GossipKind::AnnounceChunks, ]; /// A gossipsub topic which encapsulates the type of messages that should be sent and received over diff --git a/node/router/src/service.rs b/node/router/src/service.rs index 847bcce..228ae58 100644 --- a/node/router/src/service.rs +++ b/node/router/src/service.rs @@ -237,22 +237,21 @@ impl RouterService { .. } => { if matches!(message, PubsubMessage::AnnounceFile(..)) { - let maybe_peer = self + let source_version = self .network_globals .peers .read() .peer_info(&source) - .cloned(); + .map(|i| i.client().version.clone()); - if let Some(peer) = maybe_peer { - let ip = peer.seen_ip_addresses().collect::>(); - let agent = peer.client().agent_string.clone(); - let connection = peer.connection_status().clone(); - let conn_dir = peer.connection_direction().cloned(); - debug!(%source, ?ip, ?agent, ?connection, ?conn_dir, "Received AnnounceFile pubsub message"); - } else { - debug!(%source, "Received AnnounceFile pubsub message, but not found in peer db"); - } + let prop_source_version = self + .network_globals + .peers + .read() + .peer_info(&propagation_source) + .map(|i| i.client().version.clone()); + + debug!(%source, ?source_version, %propagation_source, ?prop_source_version, "Received AnnounceFile pubsub message"); } let result = self