We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c9d3553 + d55f09f commit da65f88Copy full SHA for da65f88
hydra-node/test/Hydra/Model/MockChain.hs
@@ -269,6 +269,11 @@ mockChainAndNetwork tr seedKeys commits = do
269
doRollBackward nodes chain numberOfBlocks
270
replicateM_ (fromIntegral numberOfBlocks) $
271
doRollForward nodes chain
272
+ -- NOTE: There seems to be a race condition on multiple consecutive
273
+ -- rollbackAndForward calls, which would require some minimal (1ms) delay
274
+ -- here. However, waiting here for one blockTime is not wrong and enforces
275
+ -- rollbacks / chain switches to be not more often than blocks being added.
276
+ threadDelay blockTime
277
278
doRollBackward nodes chain nbBlocks = do
279
(slotNum, position, blocks, _) <- readTVarIO chain
0 commit comments