Skip to content

Commit 9d71b6a

Browse files
committed
Remove delegators field from conway-genesis JSON
1 parent 39a08b0 commit 9d71b6a

File tree

1 file changed

+4
-2
lines changed
  • libs/cardano-ledger-core/src/Cardano/Ledger

1 file changed

+4
-2
lines changed

libs/cardano-ledger-core/src/Cardano/Ledger/DRep.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,9 @@ instance ToJSON DRepState where
186186
object $
187187
[ "expiry" .= toJSON drepExpiry
188188
, "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
190192
]
191193
++ ["anchor" .= toJSON anchor | SJust anchor <- [drepAnchor]]
192194

@@ -196,7 +198,7 @@ instance FromJSON DRepState where
196198
<$> o .: "expiry"
197199
<*> o .:? "anchor" .!= SNothing
198200
<*> o .: "deposit"
199-
-- Construction of DRep state with deleagations is intentionally prohibited, since
201+
-- Construction of DRep state with delegations is intentionally prohibited, since
200202
-- there is a requirement to retain the invariant of delegations in the UMap
201203
<*> pure mempty
202204

0 commit comments

Comments
 (0)