| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Test.Cardano.Ledger.Shelley.Rewards
Contents
Description
Currently this uses the trace mechanism to check that computing rewards has a required set of properties. It works only in the Shelley Era. It could be generalized, and then moved to the GeneratorTrace directory which computes property tests in all eras.
Synopsis
- tests ∷ TestTree
- defaultMain ∷ Spec → IO ()
- newEpochProp ∷ Word64 → (NewEpochState ShelleyEra → Property) → Property
- newEpochEventsProp ∷ Word64 → ([ChainEvent ShelleyEra] → NewEpochState ShelleyEra → Property) → Property
- data RewardUpdateOld = RewardUpdateOld {}
- createRUpdOld ∷ (EraGov era, EraCertState era) ⇒ EpochSize → BlocksMade → EpochState era → Coin → ShelleyBase RewardUpdateOld
- createRUpdOld_ ∷ EraPParams era ⇒ EpochSize → BlocksMade → SnapShots → Coin → PParams era → Coin → Set (Credential 'Staking) → NonMyopic → ShelleyBase RewardUpdateOld
Documentation
defaultMain ∷ Spec → IO () Source #
newEpochProp ∷ Word64 → (NewEpochState ShelleyEra → Property) → Property Source #
Provide a legitimate NewEpochState to make an test Property
newEpochEventsProp ∷ Word64 → ([ChainEvent ShelleyEra] → NewEpochState ShelleyEra → Property) → Property Source #
Given a NewEpochState and [ChainEvent], test a Property at every Epoch Boundary
data RewardUpdateOld Source #
Constructors
| RewardUpdateOld | |
Instances
| Show RewardUpdateOld Source # | |
Defined in Test.Cardano.Ledger.Shelley.Rewards Methods showsPrec ∷ Int → RewardUpdateOld → ShowS # show ∷ RewardUpdateOld → String # showList ∷ [RewardUpdateOld] → ShowS # | |
| Eq RewardUpdateOld Source # | |
Defined in Test.Cardano.Ledger.Shelley.Rewards Methods (==) ∷ RewardUpdateOld → RewardUpdateOld → Bool # (/=) ∷ RewardUpdateOld → RewardUpdateOld → Bool # | |
createRUpdOld ∷ (EraGov era, EraCertState era) ⇒ EpochSize → BlocksMade → EpochState era → Coin → ShelleyBase RewardUpdateOld Source #
createRUpdOld_ ∷ EraPParams era ⇒ EpochSize → BlocksMade → SnapShots → Coin → PParams era → Coin → Set (Credential 'Staking) → NonMyopic → ShelleyBase RewardUpdateOld Source #