Add comments

This commit is contained in:
boqiu 2024-10-25 14:57:30 +08:00 committed by Peter Zhang
parent 9474daabde
commit d326dc87c3

View File

@ -343,7 +343,7 @@ impl Libp2pEventHandler {
PubsubMessage::ExampleMessage(_) => MessageAcceptance::Ignore, PubsubMessage::ExampleMessage(_) => MessageAcceptance::Ignore,
PubsubMessage::NewFile(msg) => { PubsubMessage::NewFile(msg) => {
metrics::LIBP2P_HANDLE_PUBSUB_NEW_FILE.mark(1); metrics::LIBP2P_HANDLE_PUBSUB_NEW_FILE.mark(1);
self.on_new_file(source, msg).await self.on_new_file(propagation_source, msg).await
} }
PubsubMessage::FindFile(msg) => { PubsubMessage::FindFile(msg) => {
metrics::LIBP2P_HANDLE_PUBSUB_FIND_FILE.mark(1); metrics::LIBP2P_HANDLE_PUBSUB_FIND_FILE.mark(1);
@ -616,10 +616,6 @@ impl Libp2pEventHandler {
}; };
} }
// update peer shard config in cache
self.file_location_cache
.insert_peer_config(peer_id, announced_shard_config);
// check if we have it // check if we have it
if matches!(self.store.check_tx_completed(tx_id.seq).await, Ok(true)) { if matches!(self.store.check_tx_completed(tx_id.seq).await, Ok(true)) {
if let Ok(Some(tx)) = self.store.get_tx_by_seq_number(tx_id.seq).await { if let Ok(Some(tx)) = self.store.get_tx_by_seq_number(tx_id.seq).await {