Skip to content

Commit c1b646f

Browse files
committed
Remove Deleg.conwayEraSpecificSpec
1 parent 24ef174 commit c1b646f

File tree

4 files changed

+10
-40
lines changed

4 files changed

+10
-40
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ conwayEraGenericSpec = do
7474
conwayEraSpecificSpec :: SpecWith (ImpInit (LedgerSpec ConwayEra))
7575
conwayEraSpecificSpec = do
7676
describe "Conway era specific Imp spec" $ do
77-
describe "DELEG" Deleg.conwayEraSpecificSpec
7877
describe "UTXO" Utxo.conwayEraSpecificSpec
7978

8079
instance EraSpecificSpec ConwayEra where

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

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
module Test.Cardano.Ledger.Conway.Imp.DelegSpec (
1212
spec,
13-
conwayEraSpecificSpec,
1413
) where
1514

1615
import Cardano.Ledger.Address (RewardAccount (..))
@@ -169,13 +168,12 @@ spec = do
169168

170169
describe "Delegate stake" $ do
171170
it "Delegate to unregistered pool" $ do
172-
expectedDeposit <- getsNES $ nesEsL . curPParamsEpochStateL . ppKeyDepositL
173-
174171
cred <- KeyHashObj <$> freshKeyHash
172+
regTxCert <- genRegTxCert cred
175173
submitTx_ $
176174
mkBasicTx mkBasicTxBody
177175
& bodyTxL . certsTxBodyL
178-
.~ [RegDepositTxCert cred expectedDeposit]
176+
.~ [regTxCert]
179177

180178
poolKh <- freshKeyHash
181179
submitFailingTx
@@ -529,29 +527,3 @@ spec = do
529527
accounts <- getsNES $ nesEsL . esLStateL . lsCertStateL . certDStateL . accountsL
530528
impAnn (show cred <> " expected to not have their vote delegated") $
531529
expectNothingExpr (lookupDRepDelegation cred accounts)
532-
533-
conwayEraSpecificSpec :: SpecWith (ImpInit (LedgerSpec ConwayEra))
534-
conwayEraSpecificSpec = do
535-
describe "Delegate stake" $ do
536-
it "Register and delegate in the same transaction" $ do
537-
cred1 <- KeyHashObj <$> freshKeyHash
538-
regTxCert1 <- genRegTxCert cred1
539-
poolKh <- freshKeyHash
540-
registerPool poolKh
541-
submitTx_ $
542-
mkBasicTx mkBasicTxBody
543-
& bodyTxL . certsTxBodyL
544-
.~ [ regTxCert1
545-
, DelegTxCert cred1 (DelegStake poolKh)
546-
]
547-
expectDelegatedToPool cred1 poolKh
548-
549-
cred2 <- KeyHashObj <$> freshKeyHash
550-
regTxCert2 <- genRegTxCert cred2
551-
submitTx_ $
552-
mkBasicTx mkBasicTxBody
553-
& bodyTxL . certsTxBodyL
554-
.~ [ regTxCert2
555-
, DelegStakeTxCert cred2 poolKh -- using the pattern from Shelley
556-
]
557-
expectDelegatedToPool cred2 poolKh

eras/shelley/impl/testlib/Test/Cardano/Ledger/Shelley/Imp.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,4 @@ shelleyEraSpecificSpec = do
5050
Deleg.shelleyEraSpecificSpec
5151

5252
instance EraSpecificSpec ShelleyEra where
53-
eraSpecificSpec =
54-
describe "DELEG" Deleg.shelleyEraSpecificSpec
53+
eraSpecificSpec = shelleyEraSpecificSpec

eras/shelley/impl/testlib/Test/Cardano/Ledger/Shelley/Imp/DelegSpec.hs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -204,13 +204,13 @@ spec = do
204204
it "Register and delegate in the same transaction" $ do
205205
poolKh <- freshKeyHash
206206
registerPool poolKh
207-
freshKeyHash >>= \kh -> do
208-
regTxCert <- genRegTxCert (KeyHashObj kh)
209-
submitTx_ $
210-
mkBasicTx mkBasicTxBody
211-
& bodyTxL . certsTxBodyL
212-
.~ [regTxCert, delegStakeTxCert (KeyHashObj kh) poolKh]
213-
expectDelegatedToPool (KeyHashObj kh) poolKh
207+
cred <- KeyHashObj <$> freshKeyHash
208+
regTxCert <- genRegTxCert cred
209+
submitTx_ $
210+
mkBasicTx mkBasicTxBody
211+
& bodyTxL . certsTxBodyL
212+
.~ [regTxCert, delegStakeTxCert cred poolKh]
213+
expectDelegatedToPool cred poolKh
214214

215215
it "Delegate unregistered stake credentials" $ do
216216
cred <- KeyHashObj <$> freshKeyHash

0 commit comments

Comments
 (0)