Skip to content

Commit 495247e

Browse files
committed
Tweak generation frequencies in ChainDB q-s-m tests
This commit increases the generation frequencies of both the 'genAddBlock' and 'genAddPerasCert' constructions to help producing denser chains of blocks. This way, some of the events that were harder to trigger (especially TagSwitchedToShorterChain) are much more common now: * Before: Tags (5784 in total): 39.83% TagGetIsValidJust 29.72% TagChainSelReprocessKeptSelection 27.92% TagGetIsValidNothing 2.42% TagChainSelReprocessChangedSelection 0.10% TagSwitchedToShorterChain * After: Tags (5202 in total): 38.66% TagGetIsValidJust 27.87% TagChainSelReprocessKeptSelection 26.43% TagGetIsValidNothing 5.71% TagChainSelReprocessChangedSelection 1.33% TagSwitchedToShorterChain
1 parent 283fcfd commit 495247e

File tree

1 file changed

+2
-2
lines changed
  • ouroboros-consensus/test/storage-test/Test/Ouroboros/Storage/ChainDB

1 file changed

+2
-2
lines changed

ouroboros-consensus/test/storage-test/Test/Ouroboros/Storage/ChainDB/StateMachine.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -985,9 +985,9 @@ generator ::
985985
generator loe genBlock m@Model{..} =
986986
At
987987
<$> frequency
988-
[ (30, genAddBlock)
988+
[ (100, genAddBlock)
989989
, let freq = case loe of
990-
LoEDisabled -> 10
990+
LoEDisabled -> 100
991991
-- The LoE does not yet support Peras.
992992
LoEEnabled () -> 0
993993
in (freq, genAddPerasCert)

0 commit comments

Comments
 (0)