Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data GenesisTest blk schedule = GenesisTest {
- gtSecurityParam ∷ SecurityParam
- gtGenesisWindow ∷ GenesisWindow
- gtForecastRange ∷ ForecastRange
- gtDelay ∷ Delta
- gtBlockTree ∷ BlockTree blk
- gtChainSyncTimeouts ∷ ChainSyncTimeout
- gtBlockFetchTimeouts ∷ BlockFetchTimeout
- gtLoPBucketParams ∷ LoPBucketParams
- gtCSJParams ∷ CSJParams
- gtSlotLength ∷ SlotLength
- gtExtraHonestPeers ∷ Word
- gtSchedule ∷ schedule
- genChains ∷ Gen Word → Gen (GenesisTest TestBlock ())
- genChainsWithExtraHonestPeers ∷ Gen Word → Gen Word → Gen (GenesisTest TestBlock ())
Documentation
data GenesisTest blk schedule Source #
All the data used by point schedule tests.
GenesisTest | |
|
Instances
Functor (GenesisTest blk) Source # | |
Defined in Test.Consensus.PointSchedule fmap ∷ (a → b) → GenesisTest blk a → GenesisTest blk b # (<$) ∷ a → GenesisTest blk b → GenesisTest blk a # |
genChainsWithExtraHonestPeers ∷ Gen Word → Gen Word → Gen (GenesisTest TestBlock ()) Source #
Random generator for a block tree. The block tree contains one trunk (the “honest” chain) and as many branches as given as a parameter (the “alternative” chains or “bad” chains). For instance, one such tree could be graphically represented as:
slots: 1 2 3 4 5 6 7 8 9
trunk: O─────1──2──3──4─────5──6──7
│ ╰─────6
╰─────3──4─────5
For now, the extraHonestPeers
generator is only used to fill the GenesisTest field.
However, in the future it could also be used to generate "short forks" near the tip of the trunk.