Skip to content

Commit

Permalink
Use the tick duration when waiting in the scheduler, not the slot length
Browse files Browse the repository at this point in the history
  • Loading branch information
tek committed Nov 2, 2023
1 parent 82bbf05 commit c8f1c99
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ module Test.Consensus.PeerSimulator.Run (
, runPointSchedule
) where

import Cardano.Slotting.Time (SlotLength (getSlotLength),
slotLengthFromSec)
import Cardano.Slotting.Time (SlotLength, slotLengthFromSec)
import Control.Monad.Class.MonadAsync
(AsyncCancelled (AsyncCancelled))
import Control.Monad.Class.MonadTime (MonadTime)
Expand Down Expand Up @@ -64,7 +63,7 @@ import qualified Test.Consensus.PointSchedule as PointSchedule
import Test.Consensus.PointSchedule (GenesisTest (GenesisTest),
Peer (Peer), PeerId, PointSchedule (PointSchedule),
PointScheduleConfig, TestFragH, Tick (Tick),
pointSchedulePeers)
pointSchedulePeers, pscTickDuration)
import Test.Ouroboros.Consensus.ChainGenerator.Params (Asc)
import Test.Util.ChainDB
import Test.Util.Orphans.IOLike ()
Expand Down Expand Up @@ -228,7 +227,7 @@ dispatchTick config tracer peers Tick {active = Peer pid state} =
-- REVIEW: It would be worth sanity-checking that our understanding of
-- `threadDelay` is correct; and maybe getting explicit information from
-- both ChainSync & BlockFetch servers that they are done.
threadDelay (realToFrac (getSlotLength (scSlotLength config)))
threadDelay (pscTickDuration (scSchedule config))
trace $ condense pid ++ "'s tick is now done."
Nothing -> error "“The impossible happened,” as GHC would say."
where
Expand Down

0 comments on commit c8f1c99

Please sign in to comment.