mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-29 14:00:31 +08:00
The simulator scheduled a wakeup relative to the simulation's time, even when the node's clock is ahead of it, for example after `Peer::elapse`. Tests that stagger nodes this way, such as `announcement_message_amplification`, ended up running every node's periodic tasks at the same moment. Schedule the wakeup relative to the node's clock, or to the simulation's time if the node's clock is behind. Other outputs are still scheduled relative to the simulation's time. With the nodes staggered, `announcement_message_amplification` still measures close to the worst case: a node does not record the sender of a duplicate as a relayer, as the `FIXME` in `handle_announcement` notes, and so relays the message back to it.