@@ -19,9 +19,7 @@ import Cardano.Crypto.KES (MockKES)
19
19
import qualified Cardano.Crypto.KES as KES (Signable )
20
20
import Cardano.Crypto.Util (SignableRepresentation )
21
21
import Cardano.Crypto.VRF (MockVRF )
22
- import qualified Cardano.KESAgent.KES.Crypto as Agent
23
- import qualified Cardano.KESAgent.Processes.ServiceClient as Agent
24
- import qualified Cardano.KESAgent.Protocols.VersionedProtocol as Agent
22
+ import Cardano.KESAgent.Protocols.StandardCrypto (MockCrypto )
25
23
import Cardano.Ledger.BaseTypes (Seed )
26
24
import qualified Cardano.Ledger.Shelley.API as SL
27
25
import qualified Cardano.Ledger.Shelley.Core as Core
@@ -42,16 +40,8 @@ import Ouroboros.Consensus.Shelley.Ledger (ShelleyBlock,
42
40
import Ouroboros.Consensus.Shelley.Protocol.Abstract (ProtoCrypto )
43
41
import Test.QuickCheck (Arbitrary )
44
42
45
- -- | A mock replacement for 'StandardCrypto'
46
- --
47
- -- We run the tests with this mock crypto, as it is easier to generate and
48
- -- debug things. The code is parametric in the crypto, so it shouldn't make
49
- -- much of a difference. This also has the important advantage
50
- -- that we can reuse the generators from cardano-ledger-specs.
51
- data MockCrypto
52
-
53
43
instance Crypto MockCrypto where
54
- type KES MockCrypto = MockKES 10
44
+ type KES MockCrypto = MockKES 128
55
45
type VRF MockCrypto = MockVRF
56
46
57
47
instance SL. PraosCrypto MockCrypto
@@ -86,15 +76,5 @@ type CanMock proto era =
86
76
, Arbitrary (SL. CertState era )
87
77
)
88
78
89
- instance Agent. NamedCrypto (MockCrypto h ) where
90
- cryptoName _ = Agent. CryptoName " Mock"
91
-
92
- instance Agent. ServiceClientDrivers (MockCrypto h ) where
93
- availableServiceClientDrivers = []
94
-
95
- instance Agent. Crypto (MockCrypto h ) where
96
- type KES (MockCrypto h ) = MockKES 10
97
- type DSIGN (MockCrypto h ) = MockDSIGN
98
-
99
- instance HashAlgorithm h => AgentCrypto (MockCrypto h ) where
100
- type ACrypto (MockCrypto h ) = MockCrypto h
79
+ instance AgentCrypto MockCrypto where
80
+ type ACrypto MockCrypto = MockCrypto
0 commit comments