Skip to content

Commit a173a8d

Browse files
committed
srnLedgerDbBackendArgs gets and returns a StdGen
1 parent 2a7fa45 commit a173a8d

File tree

1 file changed

+5
-3
lines changed
  • ouroboros-consensus-diffusion/src/ouroboros-consensus-diffusion/Ouroboros/Consensus

1 file changed

+5
-3
lines changed

ouroboros-consensus-diffusion/src/ouroboros-consensus-diffusion/Ouroboros/Consensus/Node.hs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ module Ouroboros.Consensus.Node
4242
, LowLevelRunNodeArgs (..)
4343
, MempoolCapacityBytesOverride (..)
4444
, NodeDatabasePaths (..)
45+
, immutableDbPath
46+
, nonImmutableDbPath
4547
, NodeKernel (..)
4648
, NodeKernelArgs (..)
4749
, ProtocolInfo (..)
@@ -375,7 +377,7 @@ data
375377
, -- Ad hoc values to replace default ChainDB configurations
376378
srnSnapshotPolicyArgs :: SnapshotPolicyArgs
377379
, srnQueryBatchSize :: QueryBatchSize
378-
, srnLedgerDbBackendArgs :: LedgerDbBackendArgs m blk
380+
, srnLedgerDbBackendArgs :: (StdGen -> (LedgerDbBackendArgs m blk, StdGen))
379381
}
380382

381383
{-------------------------------------------------------------------------------
@@ -1004,7 +1006,7 @@ stdLowLevelRunNodeArgsIO
10041006
}
10051007
$(SafeWildCards.fields 'StdRunNodeArgs) = do
10061008
llrnBfcSalt <- stdBfcSaltIO
1007-
llrnRng <- newStdGen
1009+
(ldbBackendArgs, llrnRng) <- srnLedgerDbBackendArgs <$> newStdGen
10081010
pure
10091011
LowLevelRunNodeArgs
10101012
{ llrnBfcSalt
@@ -1049,7 +1051,7 @@ stdLowLevelRunNodeArgsIO
10491051
InFutureCheck.defaultClockSkew
10501052
, llrnPublicPeerSelectionStateVar =
10511053
Diffusion.dcPublicPeerSelectionVar srnDiffusionConfiguration
1052-
, llrnLdbFlavorArgs = srnLedgerDbBackendArgs
1054+
, llrnLdbFlavorArgs = ldbBackendArgs
10531055
}
10541056
where
10551057
networkMagic :: NetworkMagic

0 commit comments

Comments
 (0)