diff options
| author | tv <tv@krebsco.de> | 2026-10-28 01:47:47 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-28 01:47:47 +0100 |
| commit | db3c4e997f03a660ac37a6bdf86c6215726a71bd (patch) | |
| tree | 2aafff562a7cd1c178adbf5b5c5f5e416cb86db6 /src/simtest/timing.rs | |
| parent | 34e7ac8d6af652e0d516bce3e204386d54979b7c (diff) | |
rename PING/PONG to STATUS/STATUS_REPLY
Diffstat (limited to 'src/simtest/timing.rs')
| -rw-r--r-- | src/simtest/timing.rs | 16 |
1 files changed, 8 insertions, 8 deletions
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))); |
