Skip to content

Commit 17b9744

Browse files
committed
Remove babbageEraSpecificSpec
No longer necessary since the introduction of `genRegTxCert`, `genUnRegTxCert` `ShelleyEraImp` typeclass methods.
1 parent 516f878 commit 17b9744

File tree

4 files changed

+7
-42
lines changed

4 files changed

+7
-42
lines changed

eras/babbage/impl/testlib/Test/Cardano/Ledger/Babbage/Imp.hs

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{-# LANGUAGE TypeFamilies #-}
77
{-# OPTIONS_GHC -Wno-orphans #-}
88

9-
module Test.Cardano.Ledger.Babbage.Imp (spec, babbageEraSpecificSpec) where
9+
module Test.Cardano.Ledger.Babbage.Imp (spec) where
1010

1111
import Cardano.Ledger.Alonzo.Plutus.Context (ContextError)
1212
import Cardano.Ledger.Alonzo.Rules (
@@ -15,7 +15,7 @@ import Cardano.Ledger.Alonzo.Rules (
1515
AlonzoUtxowPredFailure,
1616
)
1717
import Cardano.Ledger.Babbage (BabbageEra)
18-
import Cardano.Ledger.Babbage.Core (BabbageEraTxBody, InjectRuleFailure, ShelleyEraTxCert)
18+
import Cardano.Ledger.Babbage.Core (BabbageEraTxBody, InjectRuleFailure)
1919
import Cardano.Ledger.Babbage.Rules (BabbageUtxoPredFailure, BabbageUtxowPredFailure)
2020
import Cardano.Ledger.Babbage.TxInfo (BabbageContextError)
2121
import Cardano.Ledger.BaseTypes (Inject)
@@ -55,19 +55,6 @@ spec = do
5555
Utxow.spec
5656
Utxos.spec @era
5757

58-
babbageEraSpecificSpec ::
59-
forall era.
60-
( AlonzoEraImp era
61-
, ShelleyEraTxCert era
62-
, BabbageEraTxBody era
63-
) =>
64-
SpecWith (ImpInit (LedgerSpec era))
65-
babbageEraSpecificSpec = do
66-
describe "Babbage era specific Imp spec" $
67-
describe "Certificates without deposits" $
68-
describe "UTXOW" Utxow.babbageEraSpecificSpec
69-
7058
instance EraSpecificSpec BabbageEra where
7159
eraSpecificSpec =
7260
AlonzoImp.alonzoEraSpecificSpec
73-
>> babbageEraSpecificSpec

eras/babbage/impl/testlib/Test/Cardano/Ledger/Babbage/Imp/UtxowSpec.hs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
{-# LANGUAGE OverloadedStrings #-}
55
{-# LANGUAGE ScopedTypeVariables #-}
66

7-
module Test.Cardano.Ledger.Babbage.Imp.UtxowSpec (spec, babbageEraSpecificSpec) where
7+
module Test.Cardano.Ledger.Babbage.Imp.UtxowSpec (spec) where
88

99
import Cardano.Ledger.Alonzo.Plutus.Context (ContextError)
1010
import Cardano.Ledger.Alonzo.Rules (AlonzoUtxosPredFailure, AlonzoUtxowPredFailure)
11-
import Cardano.Ledger.Babbage.Core (BabbageEraTxBody, InjectRuleFailure, ShelleyEraTxCert)
11+
import Cardano.Ledger.Babbage.Core (BabbageEraTxBody, InjectRuleFailure)
1212
import Cardano.Ledger.Babbage.Rules (BabbageUtxowPredFailure)
1313
import Cardano.Ledger.Babbage.TxInfo (BabbageContextError)
1414
import Cardano.Ledger.BaseTypes (Inject)
@@ -33,14 +33,3 @@ spec = do
3333
describe "UTXOW" $ do
3434
Valid.spec
3535
Invalid.spec
36-
37-
babbageEraSpecificSpec ::
38-
forall era.
39-
( AlonzoEraImp era
40-
, BabbageEraTxBody era
41-
, ShelleyEraTxCert era
42-
) =>
43-
SpecWith (ImpInit (LedgerSpec era))
44-
babbageEraSpecificSpec = do
45-
describe "UTXOW - certificates without deposits" $ do
46-
Valid.babbageEraSpecificSpec

eras/babbage/impl/testlib/Test/Cardano/Ledger/Babbage/Imp/UtxowSpec/Valid.hs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{-# LANGUAGE ScopedTypeVariables #-}
44
{-# LANGUAGE TypeApplications #-}
55

6-
module Test.Cardano.Ledger.Babbage.Imp.UtxowSpec.Valid (spec, babbageEraSpecificSpec) where
6+
module Test.Cardano.Ledger.Babbage.Imp.UtxowSpec.Valid (spec) where
77

88
import Cardano.Ledger.Alonzo.TxWits (unTxDatsL)
99
import Cardano.Ledger.Babbage.Core
@@ -171,17 +171,6 @@ spec = describe "Valid" $ do
171171
& bodyTxL . inputsTxBodyL .~ [txInAt 0 txInitial]
172172
& bodyTxL . referenceInputsTxBodyL .~ [txInAt 1 txInitial]
173173

174-
babbageEraSpecificSpec ::
175-
forall era.
176-
( AlonzoEraImp era
177-
, BabbageEraTxBody era
178-
, ShelleyEraTxCert era
179-
) =>
180-
SpecWith (ImpInit (LedgerSpec era))
181-
babbageEraSpecificSpec = describe "Valid" $ do
182-
forM_ @[] [PlutusV2 .. eraMaxLanguage @era] $ \slang -> do
183-
describe (show slang) $ do
184-
withSLanguage slang $ \lang -> do
185174
it "Use a reference script to authorize a delegation certificate" $ do
186175
addr <- freshKeyAddr_
187176
plutus <- mkPlutusScript $ alwaysSucceedsNoDatum lang
@@ -196,9 +185,10 @@ babbageEraSpecificSpec = describe "Valid" $ do
196185
submitTx $
197186
mkBasicTx mkBasicTxBody
198187
& bodyTxL . outputsTxBodyL .~ [txOut, txOutRef]
188+
cert <- genRegTxCert $ ScriptHashObj $ hashScript script
199189
submitTx_ $
200190
mkBasicTx mkBasicTxBody
201191
& bodyTxL . inputsTxBodyL .~ [txInAt 0 txInitial]
202192
& bodyTxL . referenceInputsTxBodyL .~ [txInAt 1 txInitial]
203193
& bodyTxL . certsTxBodyL
204-
.~ [RegTxCert . ScriptHashObj $ hashScript script]
194+
.~ [cert]

eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,4 @@ conwayEraSpecificSpec = do
157157
instance EraSpecificSpec ConwayEra where
158158
eraSpecificSpec =
159159
AlonzoImp.alonzoEraSpecificSpec
160-
>> BabbageImp.babbageEraSpecificSpec
161160
>> conwayEraSpecificSpec

0 commit comments

Comments
 (0)