aboutsummaryrefslogtreecommitdiffstats
path: root/src/swarm/peer/inbound.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/swarm/peer/inbound.rs')
-rw-r--r--src/swarm/peer/inbound.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/swarm/peer/inbound.rs b/src/swarm/peer/inbound.rs
index d266e5f..e23ec14 100644
--- a/src/swarm/peer/inbound.rs
+++ b/src/swarm/peer/inbound.rs
@@ -39,6 +39,11 @@ pub(crate) async fn handle_message(
note_alive(state, &peer, &message).await;
return Ok(());
}
+ // SPEAKS only says what the peer's build speaks and knows (`swarm::speaking`).
+ if let ParsedMessage::Speaks(speaks) = message {
+ state.speaking.heard(&peer, speaks);
+ return Ok(());
+ }
// WHO and ME end at the identity layer (`transport::identity`). A sync message names
// its epoch by a tag (`EpochTag`): ours, or the sender's as we know it; one naming
// neither is of an epoch we don't sync on, and says nothing we could record.
@@ -317,7 +322,8 @@ pub(crate) async fn handle_message(
transport::ParsedMessage::Who(_)
| transport::ParsedMessage::Me(_)
| transport::ParsedMessage::Ping(_)
- | transport::ParsedMessage::Pong { .. } => {}
+ | transport::ParsedMessage::Pong { .. }
+ | transport::ParsedMessage::Speaks(_) => {}
}
Ok(())