From db3c4e997f03a660ac37a6bdf86c6215726a71bd Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 28 Oct 2026 01:47:47 +0100 Subject: rename PING/PONG to STATUS/STATUS_REPLY --- src/simtest/timing.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/simtest/timing.rs') diff --git a/src/simtest/timing.rs b/src/simtest/timing.rs index ce1dfd5..20ad15c 100644 --- a/src/simtest/timing.rs +++ b/src/simtest/timing.rs @@ -10,7 +10,7 @@ use crate::document::replica::Epoch; use crate::state::{AppState, Liveness}; use crate::swarm::bootstrap::Start; use crate::transport::sim::LinkParams; -use crate::transport::{HeadsSummary, HelloRequest, Keepalive, MessageKind, ParsedMessage, RunId}; +use crate::transport::{HeadsSummary, HelloRequest, MessageKind, ParsedMessage, RunId, Status}; /// Long enough for anything that should happen within a few keepalives. const SOON: Duration = Duration::from_secs(10); @@ -311,8 +311,8 @@ async fn late_epoch_does_not_flip_a_peers_epoch() { handshake: 1, }) }; - let ping = |epoch: Epoch, epoch_seq: u32| { - ParsedMessage::Ping(Keepalive { + let status = |epoch: Epoch, epoch_seq: u32| { + ParsedMessage::Status(Status { heads: HeadsSummary::of(Vec::new()), epoch, epoch_seq, @@ -336,20 +336,20 @@ async fn late_epoch_does_not_flip_a_peers_epoch() { // The ghost switched twice; we hear of the second switch first. sim.net - .inject("ghost", "a", &ping(epoch(2), 2)) + .inject("ghost", "a", &status(epoch(2), 2)) .await .unwrap(); assert_eq!(recorded().await, (Some(epoch(2)), Some(2))); - // The PING from between the switches arrives late: ignored. + // The STATUS from between the switches arrives late: ignored. sim.net - .inject("ghost", "a", &ping(epoch(1), 1)) + .inject("ghost", "a", &status(epoch(1), 1)) .await .unwrap(); assert_eq!(recorded().await, (Some(epoch(2)), Some(2))); // So is one from before both. sim.net - .inject("ghost", "a", &ping(Epoch::GENESIS, 0)) + .inject("ghost", "a", &status(Epoch::GENESIS, 0)) .await .unwrap(); assert_eq!(recorded().await, (Some(epoch(2)), Some(2))); @@ -366,7 +366,7 @@ async fn late_epoch_does_not_flip_a_peers_epoch() { Some(second_run) ); sim.net - .inject("ghost", "a", &ping(epoch(3), 1)) + .inject("ghost", "a", &status(epoch(3), 1)) .await .unwrap(); assert_eq!(recorded().await, (Some(epoch(3)), Some(1))); -- cgit v1.3.1