Skip to content

Commit

Permalink
Merge #1517
Browse files Browse the repository at this point in the history
1517: Address review feedback on #1503 r=edsko a=edsko



Co-authored-by: Edsko de Vries <[email protected]>
  • Loading branch information
iohk-bors[bot] and edsko authored Jan 28, 2020
2 parents f9e3da6 + 6139177 commit 8ec091c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ liftUPIVOTE = liftRule . ctxtUPIVOTE
--
-- This is used in 'applyChainTick' only.
liftEPOCH :: ByronSpecGenesis -> LiftedRule Spec.EPOCH
liftEPOCH = liftRule .ctxtEPOCH
liftEPOCH = liftRule . ctxtEPOCH

-- | Apply top-level delegation rule
--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,13 @@ forgeDualByronBlock
-> PBftIsLeader PBftCardanoCrypto -- ^ Leader proof ('IsLeader')
-> m DualByronBlock
forgeDualByronBlock cfg curSlotNo curBlockNo extLedger txs isLeader = do
-- NOTE: We do not /elaborate/ the real Byron block from the spec one, but
-- instead we /forge/ it. This is important, because we want to test that
-- codepath. This does mean that we do not get any kind of "bridge" between
-- the two blocks (which we would have gotten if we would have elaborated
-- the block instead). Fortunately, this is okay, since the bridge for the
-- block can be computed from the bridge information of all of the txs.

main <- forgeByronBlock
(dualNodeConfigMain cfg)
curSlotNo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ sigGen Rules.RuleContext{..} st =
-- if this fails too often, return 'Nothing'.
hedgehogAdapter :: forall m a. MonadRandom m => Hedgehog.Gen a -> m (Maybe a)
hedgehogAdapter gen =
go 1
go 2 -- We only try twice right now, as the tests are already very slow
where
go :: Int -> m (Maybe a)
go 0 = return Nothing
Expand Down

0 comments on commit 8ec091c

Please sign in to comment.