File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
libs/cardano-ledger-core/src/Cardano/Ledger Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -186,7 +186,9 @@ instance ToJSON DRepState where
186
186
object $
187
187
[ " expiry" .= toJSON drepExpiry
188
188
, " deposit" .= toJSON drepDeposit
189
- , " delegators" .= toJSON drepDelegs
189
+ -- Since the corresponding `FromJSON` instance ignores this field, we omit it from
190
+ -- the `ToJSON` instance as well. Round-tripping is therefore as expected.
191
+ -- , "delegators" .= toJSON drepDelegs
190
192
]
191
193
++ [" anchor" .= toJSON anchor | SJust anchor <- [drepAnchor]]
192
194
@@ -196,7 +198,7 @@ instance FromJSON DRepState where
196
198
<$> o .: " expiry"
197
199
<*> o .:? " anchor" .!= SNothing
198
200
<*> o .: " deposit"
199
- -- Construction of DRep state with deleagations is intentionally prohibited, since
201
+ -- Construction of DRep state with delegations is intentionally prohibited, since
200
202
-- there is a requirement to retain the invariant of delegations in the UMap
201
203
<*> pure mempty
202
204
You can’t perform that action at this time.
0 commit comments