Skip to content

Commit 47f4f4e

Browse files
authored
Fix the flaky nightly constrained generator tests (#5216)
Remove redundant witness constraint in `wdrlSpec`
1 parent 640fb66 commit 47f4f4e

File tree

1 file changed

+2
-5
lines changed
  • libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Conway/LedgerTypes

1 file changed

+2
-5
lines changed

libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Conway/LedgerTypes/Specs.hs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,13 @@ whoDelegatesSpec univ = constrained $ \m ->
9797
]
9898

9999
wdrlSpec ::
100-
Era era =>
101100
Map (Credential 'DRepRole) (Set (Credential 'Staking)) ->
102-
WitUniv era ->
103101
Specification (Map RewardAccount Coin)
104-
wdrlSpec whodelegates univ = constrained $ \m ->
102+
wdrlSpec whodelegates = constrained $ \m ->
105103
[ assert $ sizeOf_ (dom_ m) <=. lit 5
106104
, forAll' m $ \ [var|rewacct|] _ ->
107105
match rewacct $ \ [var|_network|] [var|credStake|] ->
108106
[ assert $ _network ==. lit Testnet
109-
, witness univ credStake
110107
, assert $ member_ credStake (lit (delegators whodelegates))
111108
]
112109
]
@@ -137,7 +134,7 @@ type CertContext = (Map (Credential 'DRepRole) (Set (Credential 'Staking)), Map
137134
genCertContext :: forall era. Era era => WitUniv era -> Gen CertContext
138135
genCertContext univ = do
139136
whodelegates <- genFromSpec (whoDelegatesSpec univ)
140-
wdrl <- genFromSpec (wdrlSpec whodelegates univ)
137+
wdrl <- genFromSpec (wdrlSpec whodelegates)
141138
pure (whodelegates, wdrl)
142139

143140
-- This is a hack, neccessitated by the fact that conwayGovStateSpec,

0 commit comments

Comments
 (0)