cardano-diffusion:protocols-tests-lib
Safe HaskellNone
LanguageHaskell2010

Cardano.Network.Protocol.ChainSync.Codec.TimeLimits.Test

Synopsis

Documentation

prop_short_wait_timeout_in_intersect :: PeerTrustable -> ChainSyncIdleTimeout -> Int -> Property Source #

For state StIntersect, the timeout is always shortWait

prop_short_wait_timeout_in_canwait :: PeerTrustable -> ChainSyncIdleTimeout -> Int -> Property Source #

For state StNext StCanAwait, the timeout is always shortWait

prop_timeout_in_idle :: PeerTrustable -> ChainSyncIdleTimeout -> Int -> Property Source #

For state StIdle, the timeout is ChainSyncIdleTimeout

prop_timeout_range_for_not_trustable_in_mustreply :: ChainSyncIdleTimeout -> Int -> Property Source #

For non-trustable peers and in StNext StMustReply state, the timeout is always within the specified range

prop_no_timeout_for_trustable_peers_in_mustreply :: ChainSyncIdleTimeout -> Int -> Property Source #

For trustable peers, there's never a timeout in StNext StMustReply state

Orphan instances

Arbitrary PeerTrustable Source # 
Instance details

Methods

arbitrary :: Gen PeerTrustable #

shrink :: PeerTrustable -> [PeerTrustable] #

Arbitrary ChainSyncIdleTimeout Source # 
Instance details

Methods

arbitrary :: Gen ChainSyncIdleTimeout #

shrink :: ChainSyncIdleTimeout -> [ChainSyncIdleTimeout] #

Arbitrary DiffTime Source # 
Instance details

Show ChainSyncIdleTimeout Source # 
Instance details

Methods

showsPrec :: Int -> ChainSyncIdleTimeout -> ShowS #

show :: ChainSyncIdleTimeout -> String #

showList :: [ChainSyncIdleTimeout] -> ShowS #