@@ -43,6 +43,8 @@ module Ouroboros.Consensus.Node
4343 , LowLevelRunNodeArgs (.. )
4444 , MempoolCapacityBytesOverride (.. )
4545 , NodeDatabasePaths (.. )
46+ , immutableDbPath
47+ , nonImmutableDbPath
4648 , NodeKernel (.. )
4749 , NodeKernelArgs (.. )
4850 , ProtocolInfo (.. )
@@ -376,7 +378,10 @@ data
376378 , -- Ad hoc values to replace default ChainDB configurations
377379 srnSnapshotPolicyArgs :: SnapshotPolicyArgs
378380 , srnQueryBatchSize :: QueryBatchSize
379- , srnLedgerDbBackendArgs :: LedgerDbBackendArgs m blk
381+ , srnLedgerDbBackendArgs :: (StdGen -> (LedgerDbBackendArgs m blk , StdGen ))
382+ -- ^ The 'StdGen' will be used to initialize the salt for the LSM backend. It
383+ -- is expected that it is the same 'StdGen' that is passed elsewhere in
384+ -- Consensus, i.e. 'llrnRng'.
380385 }
381386
382387{- ------------------------------------------------------------------------------
@@ -1005,7 +1010,7 @@ stdLowLevelRunNodeArgsIO
10051010 }
10061011 $ (SafeWildCards. fields 'StdRunNodeArgs) = do
10071012 llrnBfcSalt <- stdBfcSaltIO
1008- llrnRng <- newStdGen
1013+ (ldbBackendArgs, llrnRng) <- srnLedgerDbBackendArgs <$> newStdGen
10091014 pure
10101015 LowLevelRunNodeArgs
10111016 { llrnBfcSalt
@@ -1050,7 +1055,7 @@ stdLowLevelRunNodeArgsIO
10501055 InFutureCheck. defaultClockSkew
10511056 , llrnPublicPeerSelectionStateVar =
10521057 Diffusion. dcPublicPeerSelectionVar srnDiffusionConfiguration
1053- , llrnLdbFlavorArgs = srnLedgerDbBackendArgs
1058+ , llrnLdbFlavorArgs = ldbBackendArgs
10541059 }
10551060 where
10561061 networkMagic :: NetworkMagic
0 commit comments