mirror of
https://github.com/0glabs/0g-storage-node.git
synced 2024-12-26 08:15: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_CHUNKS_TOPIC: &str = "announce_chunks";
|
||||||
pub const ANNOUNCE_SHARD_CONFIG_TOPIC: &str = "announce_shard_config";
|
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::NewFile,
|
||||||
// GossipKind::FindFile,
|
GossipKind::FindFile,
|
||||||
// GossipKind::FindChunks,
|
GossipKind::FindChunks,
|
||||||
// GossipKind::AnnounceFile,
|
GossipKind::AnnounceFile,
|
||||||
// GossipKind::AnnounceChunks,
|
GossipKind::AnnounceChunks,
|
||||||
];
|
];
|
||||||
|
|
||||||
/// A gossipsub topic which encapsulates the type of messages that should be sent and received over
|
/// 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(..)) {
|
if matches!(message, PubsubMessage::AnnounceFile(..)) {
|
||||||
let maybe_peer = self
|
let source_version = self
|
||||||
.network_globals
|
.network_globals
|
||||||
.peers
|
.peers
|
||||||
.read()
|
.read()
|
||||||
.peer_info(&source)
|
.peer_info(&source)
|
||||||
.cloned();
|
.map(|i| i.client().version.clone());
|
||||||
|
|
||||||
if let Some(peer) = maybe_peer {
|
let prop_source_version = self
|
||||||
let ip = peer.seen_ip_addresses().collect::<Vec<IpAddr>>();
|
.network_globals
|
||||||
let agent = peer.client().agent_string.clone();
|
.peers
|
||||||
let connection = peer.connection_status().clone();
|
.read()
|
||||||
let conn_dir = peer.connection_direction().cloned();
|
.peer_info(&propagation_source)
|
||||||
debug!(%source, ?ip, ?agent, ?connection, ?conn_dir, "Received AnnounceFile pubsub message");
|
.map(|i| i.client().version.clone());
|
||||||
} else {
|
|
||||||
debug!(%source, "Received AnnounceFile pubsub message, but not found in peer db");
|
debug!(%source, ?source_version, %propagation_source, ?prop_source_version, "Received AnnounceFile pubsub message");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let result = self
|
let result = self
|
||||||
|
Loading…
Reference in New Issue
Block a user