Skip to content

Commit c359047

Browse files
committed
srnLedgerDbBackendArgs gets and returns a StdGen
1 parent bc41372 commit c359047

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
@@ -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,7 @@ 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))
380382
}
381383

382384
{-------------------------------------------------------------------------------
@@ -1005,7 +1007,7 @@ stdLowLevelRunNodeArgsIO
10051007
}
10061008
$(SafeWildCards.fields 'StdRunNodeArgs) = do
10071009
llrnBfcSalt <- stdBfcSaltIO
1008-
llrnRng <- newStdGen
1010+
(ldbBackendArgs, llrnRng) <- srnLedgerDbBackendArgs <$> newStdGen
10091011
pure
10101012
LowLevelRunNodeArgs
10111013
{ llrnBfcSalt
@@ -1050,7 +1052,7 @@ stdLowLevelRunNodeArgsIO
10501052
InFutureCheck.defaultClockSkew
10511053
, llrnPublicPeerSelectionStateVar =
10521054
Diffusion.dcPublicPeerSelectionVar srnDiffusionConfiguration
1053-
, llrnLdbFlavorArgs = srnLedgerDbBackendArgs
1055+
, llrnLdbFlavorArgs = ldbBackendArgs
10541056
}
10551057
where
10561058
networkMagic :: NetworkMagic

0 commit comments

Comments
 (0)