Skip to content

Commit 25b59a8

Browse files
committed
ouroboros-nework: parsing NetworkTopology
The `peerSnapshotFile` is optional, we shouldn't throw a parsing error when it is missing.
1 parent 9409963 commit 25b59a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ouroboros-network/orphan-instances/Ouroboros/Network/OrphanInstances.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ networkTopologyFromJSON
194194
networkTopologyFromJSON parseLocalRoots parseExtraConfig =
195195
withObject "NetworkTopology" $ \o ->
196196
NetworkTopology <$> (o .: "localRoots" >>= parseLocalRoots)
197-
<*> o .: "publicRoots"
197+
<*> o .: "publicRoots"
198198
<*> o .:? "useLedgerAfterSlot" .!= DontUseLedgerPeers
199-
<*> o .: "peerSnapshotFile"
199+
<*> o .:? "peerSnapshotFile"
200200
<*> parseExtraConfig o
201201

202202
networkTopologyToJSON

0 commit comments

Comments
 (0)