mirror of
https://github.com/0glabs/0g-storage-node.git
synced 2024-12-25 15:55:17 +00:00
Some debug log for file announcement
This commit is contained in:
parent
37a601cef1
commit
d3480784fb
@ -365,6 +365,14 @@ impl Libp2pEventHandler {
|
||||
self.on_find_chunks(msg).await
|
||||
}
|
||||
PubsubMessage::AnnounceFile(msgs) => {
|
||||
let maybe_peer = self.network_globals.peers.read().peer_info(&source).cloned();
|
||||
let ip = maybe_peer.clone().map(|info| info.seen_ip_addresses().collect::<Vec<IpAddr>>());
|
||||
let agent = maybe_peer.clone().map(|info| info.client().agent_string.clone());
|
||||
let connection = maybe_peer.map(|info| info.connection_status().clone());
|
||||
|
||||
debug!(batch = %msgs.len(), %source, ?ip, ?agent, ?connection, "Received AnnounceFile pubsub message");
|
||||
|
||||
|
||||
metrics::LIBP2P_HANDLE_PUBSUB_ANNOUNCE_FILE.mark(1);
|
||||
|
||||
for msg in msgs {
|
||||
|
Loading…
Reference in New Issue
Block a user