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
@@ -1076,6 +1077,10 @@ stdLowLevelRunNodeArgsIO
10761077 ChainDB. updateSnapshotPolicyArgs srnSnapshotPolicyArgs
10771078 . ChainDB. updateQueryBatchSize srnQueryBatchSize
10781079 . ChainDB. updateTracer srnTraceChainDB
1080+ . maybe
1081+ id
1082+ (\ fp -> ChainDB. enableNonNativeSnapshots (SomeHasFS $ ioHasFS $ MountPoint fp))
1083+ srnNonNativeSnapshotsPath
10791084 . ( if not srnChainDbValidateOverride
10801085 then id
10811086 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
@@ -261,6 +262,10 @@ enableLedgerEvents args =
261262 }
262263 }
263264
265+ enableNonNativeSnapshots :: SomeHasFS m -> ChainDbArgs f m blk -> ChainDbArgs f m blk
266+ enableNonNativeSnapshots shfs args =
267+ args{cdbLgrDbArgs = (cdbLgrDbArgs args){LedgerDB. lgrNonNativeSnapshotsFS = Just shfs}}
268+
264269{- ------------------------------------------------------------------------------
265270 Relative mount points
266271-------------------------------------------------------------------------------}
You can’t perform that action at this time.
0 commit comments