Skip to content

Commit

Permalink
Fix cardano-node-test
Browse files Browse the repository at this point in the history
  • Loading branch information
neilmayhew committed Oct 31, 2023
1 parent 5e2fce2 commit 08bcf37
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions cardano-node/src/Cardano/Node/LedgerEvent.hs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ module Cardano.Node.LedgerEvent (
, SlotNo (..)
, BlockNo (..)
, StandardCrypto
, WithOrigin (..)
, serialize'
) where

Expand Down
9 changes: 7 additions & 2 deletions cardano-node/test/Test/Cardano/Node/LedgerEvent.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}

Expand Down Expand Up @@ -72,8 +71,10 @@ type StakeCredential = Credential 'Staking StandardCrypto
genAnchoredEvent :: Hedgehog.Gen AnchoredEvent
genAnchoredEvent =
AnchoredEvent
<$> genBlockHeaderHash
<$> (At <$> genBlockHeaderHash)
<*> genBlockHeaderHash
<*> genSlotNo
<*> genBlockNo
<*> Gen.choice (mconcat
[ fmap LedgerNewEpochEvent <$> genLedgerNewEpochEvent
, fmap LedgerRewardUpdateEvent <$> genLedgerRewardUpdateEvent
Expand Down Expand Up @@ -165,6 +166,10 @@ genSlotNo :: Hedgehog.Gen SlotNo
genSlotNo =
fromIntegral <$> Gen.word64 Range.constantBounded

genBlockNo :: Hedgehog.Gen BlockNo
genBlockNo =
fromIntegral <$> Gen.int Range.constantBounded

genStakeDistribution :: Hedgehog.Gen (Map StakeCredential Coin)
genStakeDistribution =
genStakeCredentialMap genCoin
Expand Down

0 comments on commit 08bcf37

Please sign in to comment.