mirror of
https://github.com/0glabs/0g-storage-node.git
synced 2024-12-26 00:05:17 +00:00
aaa
This commit is contained in:
parent
3bb242954b
commit
686e7a42e8
@ -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
|
||||
|
@ -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::<Vec<IpAddr>>();
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user