Skip to content

Commit 4f36d09

Browse files
committed
Remove redundant warning constructor in snapshot reading
1 parent 177cdb4 commit 4f36d09

File tree

2 files changed

+2
-6
lines changed
  • ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB

2 files changed

+2
-6
lines changed

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB/API.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,13 +567,13 @@ initialize replayTracer
567567
-- If the snapshot is missing a metadata file, issue a warning and try
568568
-- the next oldest snapshot
569569
Left err@(InitFailureRead (ReadMetadataError _ MetadataFileDoesNotExist)) -> do
570-
traceWith snapTracer $ SnapshotMetadataMissing s
570+
traceWith snapTracer $ InvalidSnapshot s err
571571
tryNewestFirst (acc . InitFailure s err) ss
572572

573573
-- If the snapshot's backend is incorrect, issue a warning and try
574574
-- the next oldest snapshot
575575
Left err@(InitFailureRead (ReadMetadataError _ MetadataBackendMismatch)) -> do
576-
traceWith snapTracer $ SnapshotMetadataBackendMismatch s
576+
traceWith snapTracer $ InvalidSnapshot s err
577577
tryNewestFirst (acc . InitFailure s err) ss
578578

579579
-- If the snapshot has a checksum that doesn't match the actual data,

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB/Snapshots.hs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -558,8 +558,4 @@ data TraceSnapshotEvent blk
558558
-- ^ A snapshot was written to disk.
559559
| DeletedSnapshot DiskSnapshot
560560
-- ^ An old or invalid on-disk snapshot was deleted
561-
| SnapshotMetadataMissing DiskSnapshot
562-
-- ^ The metadata file for a snapshot was missing and the snapshot was ignored
563-
| SnapshotMetadataBackendMismatch DiskSnapshot
564-
-- ^ The backend for a snapshot was incorrect and the snapshot was ignored
565561
deriving (Generic, Eq, Show)

0 commit comments

Comments
 (0)