File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
cardano-db-sync/src/Cardano/DbSync/Ledger Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -332,10 +332,12 @@ storeSnapshotAndCleanupMaybe env oldState appResult blkNo isCons syncState =
332332 case maybeFromStrict (apNewEpoch appResult) of
333333 Just newEpoch
334334 | newEpochNo <- unEpochNo (Generic. neEpoch newEpoch)
335- , newEpochNo > 0 -> do
336- -- TODO: Instead of newEpochNo - 1, is there any way to get the epochNo from 'lssOldState'?
337- liftIO $ saveCleanupState env oldState (Just $ EpochNo $ newEpochNo - 1 )
338- pure True
335+ , newEpochNo > 0
336+ , isCons || (newEpochNo `mod` 10 == 0 ) || newEpochNo >= 503 ->
337+ do
338+ -- TODO: Instead of newEpochNo - 1, is there any way to get the epochNo from 'lssOldState'?
339+ liftIO $ saveCleanupState env oldState (Just $ EpochNo $ newEpochNo - 1 )
340+ pure True
339341 _ ->
340342 if timeToSnapshot syncState blkNo && isCons
341343 then do
You can’t perform that action at this time.
0 commit comments