diff --git a/cardano-db-sync/src/Cardano/DbSync/Ledger/State.hs b/cardano-db-sync/src/Cardano/DbSync/Ledger/State.hs index 2df6f6b72..02dfaaabf 100644 --- a/cardano-db-sync/src/Cardano/DbSync/Ledger/State.hs +++ b/cardano-db-sync/src/Cardano/DbSync/Ledger/State.hs @@ -705,7 +705,7 @@ listMemorySnapshots env = do case AS.toNewestFirst $ ledgerDbCheckpoints ldb of [] -> [] [a] -> [a] - ls -> [List.head ls, List.last ls] + (h : ls) -> catMaybes [Just h, lastMay ls] notGenesis GenesisPoint = False notGenesis (BlockPoint _ _) = True