Skip to content

Commit 5055afd

Browse files
committed
Rename DelegateeNotRegisteredDELEG to DelegateeStakePoolNotRegisteredDELEG
1 parent a77ac33 commit 5055afd

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

eras/conway/impl/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
* Changed return type of `proposalsShowDebug`
3434
* Added `gen-golden` executable needed for golden tests: #4629
3535
* Add `DelegateeDRepNotRegisteredDELEG` predicate failure
36+
* Rename `DelegateeNotRegisteredDELEG` to `DelegateeStakePoolNotRegisteredDELEG`
3637

3738
### `testlib`
3839

eras/conway/impl/src/Cardano/Ledger/Conway/Rules/Deleg.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ data ConwayDelegPredFailure era
105105
| StakeKeyNotRegisteredDELEG (Credential 'Staking (EraCrypto era))
106106
| StakeKeyHasNonZeroRewardAccountBalanceDELEG Coin
107107
| DelegateeDRepNotRegisteredDELEG (Credential 'DRepRole (EraCrypto era))
108-
| DelegateeNotRegisteredDELEG (KeyHash 'StakePool (EraCrypto era))
108+
| DelegateeStakePoolNotRegisteredDELEG (KeyHash 'StakePool (EraCrypto era))
109109
deriving (Show, Eq, Generic)
110110

111111
type instance EraRuleFailure "DELEG" (ConwayEra c) = ConwayDelegPredFailure (ConwayEra c)
@@ -131,8 +131,8 @@ instance Era era => EncCBOR (ConwayDelegPredFailure era) where
131131
Sum (StakeKeyHasNonZeroRewardAccountBalanceDELEG @era) 4 !> To mCoin
132132
DelegateeDRepNotRegisteredDELEG delegatee ->
133133
Sum (DelegateeDRepNotRegisteredDELEG @era) 5 !> To delegatee
134-
DelegateeNotRegisteredDELEG delegatee ->
135-
Sum (DelegateeNotRegisteredDELEG @era) 6 !> To delegatee
134+
DelegateeStakePoolNotRegisteredDELEG delegatee ->
135+
Sum (DelegateeStakePoolNotRegisteredDELEG @era) 6 !> To delegatee
136136

137137
instance Era era => DecCBOR (ConwayDelegPredFailure era) where
138138
decCBOR = decode $ Summands "ConwayDelegPredFailure" $ \case
@@ -141,7 +141,7 @@ instance Era era => DecCBOR (ConwayDelegPredFailure era) where
141141
3 -> SumD StakeKeyNotRegisteredDELEG <! From
142142
4 -> SumD StakeKeyHasNonZeroRewardAccountBalanceDELEG <! From
143143
5 -> SumD DelegateeDRepNotRegisteredDELEG <! From
144-
6 -> SumD DelegateeNotRegisteredDELEG <! From
144+
6 -> SumD DelegateeStakePoolNotRegisteredDELEG <! From
145145
n -> Invalid n
146146

147147
instance
@@ -218,7 +218,7 @@ conwayDelegTransition = do
218218
pure $ mUMElem >>= umElemToDelegatee
219219
checkStakeDelegateeRegistered =
220220
let checkPoolRegistered targetPool =
221-
targetPool `Map.member` pools ?! DelegateeNotRegisteredDELEG targetPool
221+
targetPool `Map.member` pools ?! DelegateeStakePoolNotRegisteredDELEG targetPool
222222
checkDRepRegistered = \case
223223
DRepAlwaysAbstain -> pure ()
224224
DRepAlwaysNoConfidence -> pure ()

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ spec = do
257257
& bodyTxL . certsTxBodyL
258258
.~ [DelegTxCert cred (DelegStake poolKh)]
259259
)
260-
[injectFailure $ DelegateeNotRegisteredDELEG poolKh]
260+
[injectFailure $ DelegateeStakePoolNotRegisteredDELEG poolKh]
261261

262262
expectNotDelegatedToPool cred
263263

eras/conway/test-suite/src/Test/Cardano/Ledger/Conway/Examples/Consensus.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ ledgerExamplesConway =
8686
ApplyTxError $
8787
pure $
8888
wrapFailed @(ConwayDELEG Conway) @(ConwayLEDGER Conway) $
89-
DelegateeNotRegisteredDELEG @Conway (SLE.mkKeyHash 1)
89+
DelegateeStakePoolNotRegisteredDELEG @Conway (SLE.mkKeyHash 1)
9090
, SLE.sleRewardsCredentials =
9191
Set.fromList
9292
[ Left (Coin 100)

libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/PrettyCore.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1982,7 +1982,7 @@ ppConwayDelegPredFailure x = case x of
19821982
StakeKeyHasNonZeroRewardAccountBalanceDELEG c ->
19831983
ppSexp "StakeKeyHasNonZeroRewardAccountBalanceDELEG" [pcCoin c]
19841984
ConwayRules.DelegateeDRepNotRegisteredDELEG cred -> ppSexp "DelegateeDRepNotRegisteredDELEG" [pcCredential cred]
1985-
ConwayRules.DelegateeNotRegisteredDELEG kh -> ppSexp "DelegateeNotRegisteredDELEG" [pcKeyHash kh]
1985+
ConwayRules.DelegateeStakePoolNotRegisteredDELEG kh -> ppSexp "DelegateeStakePoolNotRegisteredDELEG" [pcKeyHash kh]
19861986

19871987
instance PrettyA (ConwayDelegPredFailure era) where
19881988
prettyA = ppConwayDelegPredFailure

0 commit comments

Comments
 (0)