Skip to content

Commit b186845

Browse files
committed
Return a Maybe CRC when taking a V2 snapshot in preparation for LSM
1 parent 1940d68 commit b186845

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
@@ -95,7 +95,7 @@ data LedgerTablesHandle m l = LedgerTablesHandle
9595
-- The first argument has to be the ledger state before applying
9696
-- the block, the second argument should be the ledger state after
9797
-- applying a block. See 'CanUpgradeLedgerTables'.
98-
, takeHandleSnapshot :: !(l EmptyMK -> String -> m CRC)
98+
, takeHandleSnapshot :: !(l EmptyMK -> String -> m (Maybe CRC))
9999
, tablesSize :: !(m (Maybe Int))
100100
-- ^ Consult the size of the ledger tables in the database. This will return
101101
-- 'Nothing' in backends that do not support this operation.

0 commit comments

Comments
 (0)