Skip to content

Commit a849092

Browse files
committed
Remove registerPoolWithDeposit
1 parent 807b8c4 commit a849092

File tree

4 files changed

+18
-29
lines changed

4 files changed

+18
-29
lines changed

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ spec = do
218218
otherStakeCred <- KeyHashObj <$> freshKeyHash
219219
otherRewardAccount <- getRewardAccountFor otherStakeCred
220220
khStakePool <- freshKeyHash
221-
registerPoolWithDeposit khStakePool
221+
registerPool khStakePool
222222
submitTx_ . mkBasicTx $
223223
mkBasicTxBody
224224
& certsTxBodyL
@@ -255,7 +255,7 @@ spec = do
255255
.~ [RegDepositTxCert cred expectedDeposit]
256256

257257
poolKh <- freshKeyHash
258-
registerPoolWithDeposit poolKh
258+
registerPool poolKh
259259

260260
submitTx_ $
261261
mkBasicTx mkBasicTxBody
@@ -268,7 +268,7 @@ spec = do
268268
expectedDeposit <- getsNES $ nesEsL . curPParamsEpochStateL . ppKeyDepositL
269269

270270
poolKh <- freshKeyHash
271-
registerPoolWithDeposit poolKh
271+
registerPool poolKh
272272
freshKeyHash >>= \kh -> do
273273
submitTx_ $
274274
mkBasicTx mkBasicTxBody
@@ -279,7 +279,7 @@ spec = do
279279
it "Delegate unregistered stake credentials" $ do
280280
cred <- KeyHashObj <$> freshKeyHash
281281
poolKh <- freshKeyHash
282-
registerPoolWithDeposit poolKh
282+
registerPool poolKh
283283
submitFailingTx
284284
( mkBasicTx mkBasicTxBody
285285
& bodyTxL . certsTxBodyL
@@ -313,7 +313,7 @@ spec = do
313313

314314
cred <- KeyHashObj <$> freshKeyHash
315315
poolKh <- freshKeyHash
316-
registerPoolWithDeposit poolKh
316+
registerPool poolKh
317317
submitTx_ $
318318
mkBasicTx mkBasicTxBody
319319
& bodyTxL . certsTxBodyL
@@ -328,17 +328,17 @@ spec = do
328328
expectDelegatedToPool cred poolKh
329329

330330
poolKh1 <- freshKeyHash
331-
registerPoolWithDeposit poolKh1
331+
registerPool poolKh1
332332
submitTx_ $
333333
mkBasicTx mkBasicTxBody
334334
& bodyTxL . certsTxBodyL
335335
.~ [DelegTxCert cred (DelegStake poolKh1)]
336336
expectDelegatedToPool cred poolKh1
337337

338338
poolKh2 <- freshKeyHash
339-
registerPoolWithDeposit poolKh2
339+
registerPool poolKh2
340340
poolKh3 <- freshKeyHash
341-
registerPoolWithDeposit poolKh3
341+
registerPool poolKh3
342342

343343
submitTx_ $
344344
mkBasicTx mkBasicTxBody
@@ -354,7 +354,7 @@ spec = do
354354

355355
cred <- KeyHashObj <$> freshKeyHash
356356
poolKh <- freshKeyHash
357-
registerPoolWithDeposit poolKh
357+
registerPool poolKh
358358
submitTx_ $
359359
mkBasicTx mkBasicTxBody
360360
& bodyTxL . certsTxBodyL
@@ -564,7 +564,7 @@ spec = do
564564
cred <- KeyHashObj <$> freshKeyHash
565565
poolKh <- freshKeyHash
566566
rewardAccount <- registerRewardAccountWithDeposit
567-
registerPoolWithDeposit poolKh
567+
registerPool poolKh
568568
drepCred <- KeyHashObj <$> registerDRep
569569

570570
submitTx_ $
@@ -632,7 +632,7 @@ spec = do
632632

633633
cred <- KeyHashObj <$> freshKeyHash
634634
poolKh <- freshKeyHash
635-
registerPoolWithDeposit poolKh
635+
registerPool poolKh
636636
drepCred <- KeyHashObj <$> registerDRep
637637

638638
submitTx_ $
@@ -657,7 +657,7 @@ spec = do
657657

658658
cred <- KeyHashObj <$> freshKeyHash
659659
poolKh <- freshKeyHash
660-
registerPoolWithDeposit poolKh
660+
registerPool poolKh
661661
drepCred <- KeyHashObj <$> registerDRep
662662

663663
submitTx_ $
@@ -672,7 +672,7 @@ spec = do
672672
expectDelegatedVote cred (DRepCredential drepCred)
673673

674674
poolKh' <- freshKeyHash
675-
registerPoolWithDeposit poolKh'
675+
registerPool poolKh'
676676
submitTx_ $
677677
mkBasicTx mkBasicTxBody
678678
& bodyTxL . certsTxBodyL
@@ -740,7 +740,7 @@ conwayEraSpecificSpec = do
740740
cred1 <- KeyHashObj <$> freshKeyHash
741741
regTxCert1 <- genRegTxCert cred1
742742
poolKh <- freshKeyHash
743-
registerPoolWithDeposit poolKh
743+
registerPool poolKh
744744
submitTx_ $
745745
mkBasicTx mkBasicTxBody
746746
& bodyTxL . certsTxBodyL

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ votingSpec =
886886
conAnchor `shouldNotBe` anchor
887887
it "can submit SPO votes" $ do
888888
spoHash <- freshKeyHash
889-
registerPoolWithDeposit spoHash
889+
registerPool spoHash
890890
passNEpochs 3
891891
gaId <-
892892
submitParameterChange SNothing $

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

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ module Test.Cardano.Ledger.Conway.ImpTest (
131131
delegateSPORewardAddressToDRep_,
132132
getCommittee,
133133
conwayRegisterStakeCredential,
134-
registerPoolWithDeposit,
135134
registerRewardAccountWithDeposit,
136135
) where
137136

@@ -491,7 +490,7 @@ setupPoolWithStake ::
491490
ImpTestM era (KeyHash 'StakePool, Credential 'Payment, Credential 'Staking)
492491
setupPoolWithStake delegCoin = do
493492
khPool <- freshKeyHash
494-
registerPoolWithDeposit khPool
493+
registerPool khPool
495494
credDelegatorPayment <- KeyHashObj <$> freshKeyHash
496495
credDelegatorStaking <- KeyHashObj <$> freshKeyHash
497496
sendCoinTo_ (mkAddr credDelegatorPayment credDelegatorStaking) delegCoin
@@ -512,7 +511,7 @@ setupPoolWithoutStake ::
512511
ImpTestM era (KeyHash 'StakePool, Credential 'Staking)
513512
setupPoolWithoutStake = do
514513
khPool <- freshKeyHash
515-
registerPoolWithDeposit khPool
514+
registerPool khPool
516515
credDelegatorStaking <- KeyHashObj <$> freshKeyHash
517516
deposit <- getsNES $ nesEsL . curPParamsEpochStateL . ppKeyDepositL
518517
submitTxAnn_ "Delegate to stake pool" $
@@ -1811,14 +1810,6 @@ conwayRegisterStakeCredential cred = do
18111810
networkId <- use (impGlobalsL . to networkId)
18121811
pure $ RewardAccount networkId cred
18131812

1814-
registerPoolWithDeposit ::
1815-
ConwayEraImp era =>
1816-
KeyHash 'StakePool ->
1817-
ImpTestM era ()
1818-
registerPoolWithDeposit khPool =
1819-
(freshKeyHash >>= registerStakeCredential . KeyHashObj)
1820-
>>= registerPoolWithRewardAccount khPool
1821-
18221813
registerRewardAccountWithDeposit ::
18231814
forall era.
18241815
ConwayEraImp era =>

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1551,9 +1551,7 @@ freshPoolParams khPool rewardAccount = do
15511551
}
15521552

15531553
registerPool ::
1554-
( ShelleyEraImp era
1555-
, ShelleyEraTxCert era
1556-
) =>
1554+
ShelleyEraImp era =>
15571555
KeyHash 'StakePool ->
15581556
ImpTestM era ()
15591557
registerPool khPool = registerRewardAccount >>= registerPoolWithRewardAccount khPool

0 commit comments

Comments
 (0)