File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
ouroboros-consensus-diffusion/src/ouroboros-consensus-diffusion/Ouroboros/Consensus
ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/ChainDB/Impl Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 359359 , srnChainDbValidateOverride :: Bool
360360 -- ^ If @True@, validate the ChainDB on init no matter what
361361 , srnDatabasePath :: NodeDatabasePaths
362+ , srnNonNativeSnapshotsPath :: Maybe FilePath
362363 -- ^ Location of the DBs
363364 , srnDiffusionArguments :: Cardano.Diffusion. CardanoNodeArguments m
364365 , srnDiffusionConfiguration :: Cardano.Diffusion. CardanoConfiguration m
@@ -1062,6 +1063,10 @@ stdLowLevelRunNodeArgsIO
10621063 ChainDB. updateSnapshotPolicyArgs srnSnapshotPolicyArgs
10631064 . ChainDB. updateQueryBatchSize srnQueryBatchSize
10641065 . ChainDB. updateTracer srnTraceChainDB
1066+ . maybe
1067+ id
1068+ (\ fp -> ChainDB. enableNonNativeSnapshots (SomeHasFS $ ioHasFS $ MountPoint fp))
1069+ srnNonNativeSnapshotsPath
10651070 . ( if not srnChainDbValidateOverride
10661071 then id
10671072 else ChainDB. ensureValidateAll
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ module Ouroboros.Consensus.Storage.ChainDB.Impl.Args
1313 , completeChainDbArgs
1414 , defaultArgs
1515 , enableLedgerEvents
16+ , enableNonNativeSnapshots
1617 , ensureValidateAll
1718 , updateQueryBatchSize
1819 , updateSnapshotPolicyArgs
@@ -263,6 +264,10 @@ enableLedgerEvents args =
263264 }
264265 }
265266
267+ enableNonNativeSnapshots :: SomeHasFS m -> ChainDbArgs f m blk -> ChainDbArgs f m blk
268+ enableNonNativeSnapshots shfs args =
269+ args{cdbLgrDbArgs = (cdbLgrDbArgs args){LedgerDB. lgrNonNativeSnapshotsFS = Just shfs}}
270+
266271{- ------------------------------------------------------------------------------
267272 Relative mount points
268273-------------------------------------------------------------------------------}
You can’t perform that action at this time.
0 commit comments