File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB/V2 Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ import Data.Void
7676import Database.LSMTree (Session , Table )
7777import qualified Database.LSMTree as LSM
7878import qualified Database.LSMTree.Internal.Types as LSM
79+ -- import qualified Debug.Trace as Debug
7980import GHC.Generics
8081import NoThunks.Class
8182import Ouroboros.Consensus.Block
@@ -191,7 +192,9 @@ newLSMLedgerTablesHandle tracer rr session (resKey, t0) = do
191192 , takeHandleSnapshot = \ _ snapshotName -> do
192193 guardClosed tv $
193194 \ table -> do
194- Monad. void $ LSM. saveSnapshot (fromString snapshotName) " UTxO table" table
195+ exists <- LSM. doesSnapshotExist session (fromString snapshotName)
196+ -- Debug.traceShowM =<< LSM.listSnapshots session
197+ Monad. when (not exists) $ LSM. saveSnapshot (fromString snapshotName) " UTxO table" table
195198 pure Nothing
196199 , tablesSize = pure Nothing
197200 }
You can’t perform that action at this time.
0 commit comments