Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type Block h = ShelleyBlock (TPraos (MockCrypto h)) (MockShelley h)
- type CanMock proto era = (ShelleyCompatible proto era, LedgerSupportsProtocol (ShelleyBlock proto era), Mock (EraCrypto era), PraosCrypto (EraCrypto era), EraTx era, Arbitrary (TxAuxData era), Arbitrary (PParams era), Arbitrary (PParamsUpdate era), Arbitrary (Script era), Arbitrary (TxBody era), Arbitrary (Tx era), Arbitrary (TxOut era), Arbitrary (Value era), Arbitrary (PredicateFailure (ShelleyUTXOW era)), Arbitrary (TxWits era), Arbitrary (StashedAVVMAddresses era), Arbitrary (GovState era))
- data MockCrypto h
- type MockShelley h = ShelleyEra (MockCrypto h)
Documentation
type Block h = ShelleyBlock (TPraos (MockCrypto h)) (MockShelley h) Source #
type CanMock proto era = (ShelleyCompatible proto era, LedgerSupportsProtocol (ShelleyBlock proto era), Mock (EraCrypto era), PraosCrypto (EraCrypto era), EraTx era, Arbitrary (TxAuxData era), Arbitrary (PParams era), Arbitrary (PParamsUpdate era), Arbitrary (Script era), Arbitrary (TxBody era), Arbitrary (Tx era), Arbitrary (TxOut era), Arbitrary (Value era), Arbitrary (PredicateFailure (ShelleyUTXOW era)), Arbitrary (TxWits era), Arbitrary (StashedAVVMAddresses era), Arbitrary (GovState era)) Source #
Cryptography that can easily be mocked
data MockCrypto h Source #
A mock replacement for StandardCrypto
We run the tests with this mock crypto, as it is easier to generate and debug things. The code is parametric in the crypto, so it shouldn't make much of a difference. This also has the important advantage that we can reuse the generators from cardano-ledger-specs.
Instances
type MockShelley h = ShelleyEra (MockCrypto h) Source #