Skip to content

Commit 7c1388b

Browse files
committed
Fix TODO in LedgerPeerSnapshot reading
1 parent 1266651 commit 7c1388b

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

cardano-node/src/Cardano/Node/Configuration/TopologyP2P.hs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -349,19 +349,16 @@ readTopologyFileOrError nc tr =
349349
<> Text.unpack err)
350350
pure
351351

352-
-- TODO(10.7): what the resulting LedgerPeersKind should be?
353-
-- Probably we need to use the LedgerPeerSnapshotWithBlock type
354352
readPeerSnapshotFile :: PeerSnapshotFile -> IO (Either Text (LedgerPeerSnapshot BigLedgerPeers))
355353
readPeerSnapshotFile (PeerSnapshotFile file) = do
356-
_content <- first renderException <$> try (BS.readFile file)
357-
-- return $ first handler $ content >>= eitherDecodeStrict
358-
undefined -- TODO(10.7)
354+
content <- first renderException <$> try (BS.readFile file)
355+
return $ first handler $ content >>= eitherDecodeStrict
359356
where
360357
renderException :: IOException -> String
361358
renderException = displayException
362359

363-
_handler :: String -> Text
364-
_handler msg =
360+
handler :: String -> Text
361+
handler msg =
365362
Text.pack
366363
$ "Cardano.Node.Configuration.TopologyP2P.readPeerSnapshotFile: " <> msg
367364

0 commit comments

Comments
 (0)