Skip to content

Commit 555cbf6

Browse files
committed
Return a Maybe CRC when taking a V2 snapshot in preparation for LSM
1 parent 61b1eab commit 555cbf6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB/V2/InMemory.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ newInMemoryLedgerTablesHandle tracer someFS@(SomeHasFS hasFS) l = do
139139
guardClosed h $
140140
\values ->
141141
withFile hasFS (mkFsPath [snapshotName, "tables", "tvar"]) (WriteMode MustBeNew) $ \hf ->
142-
fmap snd $
142+
fmap (Just . snd) $
143143
hPutAllCRC hasFS hf $
144144
CBOR.toLazyByteString $
145145
valuesMKEncoder hint values

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB/V2/LedgerSeq.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ data LedgerTablesHandle m l = LedgerTablesHandle
9696
-- The first argument has to be the ledger state before applying
9797
-- the block, the second argument should be the ledger state after
9898
-- applying a block. See 'CanUpgradeLedgerTables'.
99-
, takeHandleSnapshot :: !(l EmptyMK -> String -> m CRC)
99+
, takeHandleSnapshot :: !(l EmptyMK -> String -> m (Maybe CRC))
100100
, tablesSize :: !(m (Maybe Int))
101101
-- ^ Consult the size of the ledger tables in the database. This will return
102102
-- 'Nothing' in backends that do not support this operation.

0 commit comments

Comments
 (0)