Skip to content

Commit 39406bf

Browse files
Lucsanszkylehins
andcommitted
Apply suggestions from code review
Co-authored-by: Alexey Kuleshevich <[email protected]>
1 parent 15a8216 commit 39406bf

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

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
@@ -693,7 +693,7 @@ spec = do
693693
accountState <- expectJust $ lookupAccountState cred accounts
694694
expectNothingExpr (accountState ^. stakePoolDelegationAccountStateL)
695695

696-
expectDelegatedVote :: Credential 'Staking -> DRep -> ImpTestM era ()
696+
expectDelegatedVote :: HasCallStack => Credential 'Staking -> DRep -> ImpTestM era ()
697697
expectDelegatedVote cred drep = do
698698
accounts <- getsNES $ nesEsL . esLStateL . lsCertStateL . certDStateL . accountsL
699699
dreps <- getsNES $ nesEsL . epochStateRegDrepL

eras/dijkstra/src/Cardano/Ledger/Dijkstra/Rules/Cert.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ instance InjectRuleFailure "CERT" ConwayGovCertPredFailure DijkstraEra where
4747
injectFailure = GovCertFailure
4848

4949
instance
50-
forall era.
5150
( Era era
5251
, State (EraRule "DELEG" era) ~ CertState era
5352
, State (EraRule "POOL" era) ~ PState era

eras/dijkstra/src/Cardano/Ledger/Dijkstra/TxCert.hs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,16 @@ data DijkstraDelegCert
9292

9393
instance EncCBOR DijkstraDelegCert where
9494
encCBOR = \case
95+
DijkstraRegCert cred deposit ->
96+
encodeListLen 3
97+
<> encodeWord8 7
98+
<> encCBOR cred
99+
<> encCBOR deposit
100+
DijkstraUnRegCert cred deposit ->
101+
encodeListLen 3
102+
<> encodeWord8 8
103+
<> encCBOR cred
104+
<> encCBOR deposit
95105
DijkstraDelegCert cred (DelegStake poolId) -> encodeShelleyDelegCert $ ShelleyDelegCert cred poolId
96106
DijkstraDelegCert cred (DelegVote drep) ->
97107
encodeListLen 3
@@ -104,16 +114,6 @@ instance EncCBOR DijkstraDelegCert where
104114
<> encCBOR cred
105115
<> encCBOR poolId
106116
<> encCBOR dRep
107-
DijkstraRegCert cred deposit ->
108-
encodeListLen 3
109-
<> encodeWord8 7
110-
<> encCBOR cred
111-
<> encCBOR deposit
112-
DijkstraUnRegCert cred deposit ->
113-
encodeListLen 3
114-
<> encodeWord8 8
115-
<> encCBOR cred
116-
<> encCBOR deposit
117117
DijkstraRegDelegCert cred (DelegStake poolId) deposit ->
118118
encodeListLen 4
119119
<> encodeWord8 11

0 commit comments

Comments
 (0)