Skip to content

Commit 1fa0c30

Browse files
committed
Fix rebase
1 parent 576b3d4 commit 1fa0c30

File tree

30 files changed

+86
-85
lines changed

30 files changed

+86
-85
lines changed

ouroboros-consensus-cardano/ouroboros-consensus-cardano.cabal

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,6 @@ test-suite cardano-test
450450
cardano-ledger-alonzo-test,
451451
cardano-ledger-api,
452452
cardano-ledger-babbage-test,
453-
cardano-ledger-binary,
454453
cardano-ledger-binary:testlib,
455454
cardano-ledger-byron,
456455
cardano-ledger-conway:testlib,

ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/Ledger/Query.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ data instance BlockQuery (ShelleyBlock proto era) fp result where
332332
=> BlockQuery (ShelleyBlock proto era) QFNoTables (CG.RatifyState era)
333333

334334
GetFuturePParams
335-
:: BlockQuery (ShelleyBlock proto era) (Maybe (LC.PParams era))
335+
:: BlockQuery (ShelleyBlock proto era) QFNoTables (Maybe (LC.PParams era))
336336

337337
-- | Obtain a snapshot of big ledger peers. CLI can serialize these,
338338
-- and if made available to the node by topology configuration,

ouroboros-consensus-cardano/src/unstable-cardano-tools/Cardano/Tools/DBSynthesizer/Forging.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import Control.Monad (when)
1515
import Control.Monad.Except (runExcept)
1616
import Control.Monad.IO.Class (liftIO)
1717
import Control.Monad.Trans.Except (ExceptT, runExceptT, throwE)
18+
import Control.ResourceRegistry
1819
import Control.Tracer as Trace (nullTracer)
1920
import Data.Either (isRight)
2021
import Data.Maybe (isJust)
@@ -45,7 +46,6 @@ import qualified Ouroboros.Consensus.Storage.ChainDB.API.Types.InvalidBlockPunis
4546
import Ouroboros.Consensus.Storage.LedgerDB.API
4647
import Ouroboros.Consensus.Ticked
4748
import Ouroboros.Consensus.Util.IOLike (atomically)
48-
import Ouroboros.Consensus.Util.ResourceRegistry
4949
import Ouroboros.Network.AnchoredFragment as AF (Anchor (..),
5050
AnchoredFragment, AnchoredSeq (..), headPoint)
5151
import Ouroboros.Network.Protocol.LocalStateQuery.Type

ouroboros-consensus-cardano/test/cardano-test/Test/Consensus/Cardano/Translation.hs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import qualified Cardano.Chain.Block as Byron
1717
import qualified Cardano.Chain.UTxO as Byron
1818
import Cardano.Ledger.Alonzo ()
1919
import Cardano.Ledger.BaseTypes (Network (Testnet), TxIx (..))
20-
import Cardano.Ledger.Binary.Version
2120
import qualified Cardano.Ledger.Core as Core
2221
import qualified Cardano.Ledger.Crypto as Crypto
2322
import qualified Cardano.Ledger.Genesis as Genesis
@@ -35,7 +34,6 @@ import Cardano.Slotting.EpochInfo (fixedEpochInfo)
3534
import Cardano.Slotting.Slot (EpochNo (..))
3635
import qualified Data.ListMap as ListMap
3736
import qualified Data.Map.Strict as Map
38-
import Data.Maybe (fromMaybe)
3937
import Data.SOP.BasicFunctors
4038
import Data.SOP.Functors
4139
import Data.SOP.InPairs (RequiringBoth (..), provideBoth)
@@ -56,8 +54,6 @@ import Ouroboros.Consensus.Ledger.Tables.Diff (Diff)
5654
import qualified Ouroboros.Consensus.Ledger.Tables.Diff as Diff
5755
import Ouroboros.Consensus.Ledger.Tables.Utils
5856
import Ouroboros.Consensus.Protocol.Praos
59-
import Ouroboros.Consensus.Protocol.Praos.Common
60-
(MaxMajorProtVer (..))
6157
import Ouroboros.Consensus.Protocol.TPraos (TPraos)
6258
import Ouroboros.Consensus.Shelley.Eras
6359
import Ouroboros.Consensus.Shelley.HFEras ()
@@ -380,7 +376,6 @@ fixedShelleyLedgerConfig translationContext = mkShelleyLedgerConfig
380376
shelleyGenesis
381377
translationContext
382378
(fixedEpochInfo (sgEpochLength shelleyGenesis) (slotLengthFromSec 2))
383-
(MaxMajorProtVer (fromMaybe (error "this will never trigger") $ mkVersion (10 :: Int)))
384379
where
385380
shelleyGenesis = ShelleyGenesis {
386381
sgSystemStart = dawnOfTime

ouroboros-consensus-cardano/test/cardano-test/Test/ThreadNet/Cardano.hs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import Data.Maybe (maybeToList)
3030
import Data.Proxy (Proxy (..))
3131
import Data.Set (Set)
3232
import qualified Data.Set as Set
33+
import Data.SOP.Functors
3334
import Data.Word (Word64)
3435
import Lens.Micro
3536
import Ouroboros.Consensus.Block.Forging (BlockForging)
@@ -530,9 +531,9 @@ setByronProtVer =
530531
modifyExtLedger f elgr = elgr { ledgerState = f (ledgerState elgr ) }
531532

532533
modifyHFLedgerState ::
533-
(LedgerState x -> LedgerState x)
534-
-> LedgerState (HardForkBlock (x : xs))
535-
-> LedgerState (HardForkBlock (x : xs))
534+
(LedgerState x mk -> LedgerState x mk)
535+
-> LedgerState (HardForkBlock (x : xs)) mk
536+
-> LedgerState (HardForkBlock (x : xs)) mk
536537
modifyHFLedgerState f (HardForkLedgerState (HardForkState (TZ st))) =
537-
HardForkLedgerState (HardForkState (TZ st {currentState = f (currentState st)}))
538+
HardForkLedgerState (HardForkState (TZ st {currentState = Flip $ f (unFlip $ currentState st)}))
538539
modifyHFLedgerState _ st = st

ouroboros-consensus/ouroboros-consensus.cabal

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,6 @@ test-suite consensus-test
602602
fingertree-rm,
603603
fs-api ^>=0.3,
604604
fs-sim,
605-
generics-sop,
606605
hashable,
607606
io-classes,
608607
io-sim,
@@ -632,7 +631,6 @@ test-suite consensus-test
632631
time,
633632
transformers,
634633
transformers-base,
635-
tree-diff,
636634
typed-protocols ^>=0.3,
637635
typed-protocols-examples,
638636
typed-protocols-stateful,

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Ledger/Tables/Diff.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ toAntiDiff :: Diff k v -> Anti.Diff k v
210210
toAntiDiff (Diff d) = Anti.Diff (Map.map f d)
211211
where
212212
f (Insert v) = Anti.singletonInsert v
213-
f Delete = Anti.singletonDelete undefined
213+
f Delete = Anti.singletonDelete
214214

215215
{-------------------------------------------------------------------------------
216216
Traversals and folds

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Mempool/Impl/Common.hs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -473,10 +473,3 @@ deriving instance ( Show (GenTx blk)
473473
, Show (ApplyTxErr blk)
474474
, StandardHash blk
475475
) => Show (TraceEventMempool blk)
476-
477-
deriving instance ( NoThunks (GenTx blk)
478-
, NoThunks (Validated (GenTx blk))
479-
, NoThunks (GenTxId blk)
480-
, NoThunks (ApplyTxErr blk)
481-
, StandardHash blk
482-
) => NoThunks (TraceEventMempool blk)

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Mempool/Update.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,8 @@ implSyncWithLedger mpEnv = do
440440
-- If the point is gone, resync
441441
pure (Resync, is)
442442
case res of
443-
OK v -> pure v
444-
Resync -> implSyncWithLedger mpEnv
443+
OK v -> pure v
444+
Resync -> implSyncWithLedger mpEnv
445445
Retry _ -> error "Impossible!"
446446
where
447447
MempoolEnv { mpEnvStateVar = istate

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/ChainDB/Impl.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ import Control.Monad (void, when)
3838
import Control.Monad.Base (MonadBase)
3939
import Control.Monad.Trans.Class (lift)
4040
import Control.ResourceRegistry (WithTempRegistry, allocate,
41-
runInnerWithTempRegistry, runWithTempRegistry)
41+
runInnerWithTempRegistry, runWithTempRegistry,
42+
withRegistry)
4243
import Control.Tracer
4344
import Data.Functor ((<&>))
4445
import Data.Functor.Contravariant ((>$<))

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/ChainDB/Impl/ChainSel.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import Control.Monad (forM, forM_, unless, void, when)
2525
import Control.Monad.Except ()
2626
import Control.Monad.Trans.Class (lift)
2727
import Control.Monad.Trans.State.Strict
28+
import Control.ResourceRegistry (ResourceRegistry, withRegistry)
2829
import Control.Tracer (Tracer, nullTracer, traceWith)
2930
import Data.Foldable (for_)
3031
import Data.Function (on)
@@ -81,8 +82,6 @@ import Ouroboros.Consensus.Util
8182
import Ouroboros.Consensus.Util.AnchoredFragment
8283
import Ouroboros.Consensus.Util.Enclose (encloseWith)
8384
import Ouroboros.Consensus.Util.IOLike
84-
import Ouroboros.Consensus.Util.ResourceRegistry (ResourceRegistry,
85-
withRegistry)
8685
import Ouroboros.Consensus.Util.STM (WithFingerprint (..))
8786
import Ouroboros.Network.AnchoredFragment (Anchor, AnchoredFragment,
8887
AnchoredSeq (..))

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/ChainDB/Impl/Query.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ module Ouroboros.Consensus.Storage.ChainDB.Impl.Query (
2929
, getAnyKnownBlockComponent
3030
) where
3131

32+
import Control.ResourceRegistry (ResourceRegistry)
3233
import qualified Data.Map.Strict as Map
3334
import qualified Data.Set as Set
3435
import Ouroboros.Consensus.Block
@@ -49,7 +50,6 @@ import Ouroboros.Consensus.Storage.VolatileDB (VolatileDB)
4950
import qualified Ouroboros.Consensus.Storage.VolatileDB as VolatileDB
5051
import Ouroboros.Consensus.Util (eitherToMaybe)
5152
import Ouroboros.Consensus.Util.IOLike
52-
import Ouroboros.Consensus.Util.ResourceRegistry (ResourceRegistry)
5353
import Ouroboros.Consensus.Util.STM (WithFingerprint (..))
5454
import Ouroboros.Network.AnchoredFragment (AnchoredFragment)
5555
import qualified Ouroboros.Network.AnchoredFragment as AF

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/ImmutableDB/Impl/Stream.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ module Ouroboros.Consensus.Storage.ImmutableDB.Impl.Stream (
1212
) where
1313

1414
import Control.Monad.Except
15+
import Control.ResourceRegistry
1516
import GHC.Stack
1617
import Ouroboros.Consensus.Block
1718
import Ouroboros.Consensus.Storage.Common
1819
import Ouroboros.Consensus.Storage.ImmutableDB hiding (streamAll)
1920
import qualified Ouroboros.Consensus.Storage.ImmutableDB.API as ImmutableDB
2021
import Ouroboros.Consensus.Util.IOLike
21-
import Ouroboros.Consensus.Util.ResourceRegistry
2222

2323
{-------------------------------------------------------------------------------
2424
Abstraction over the streaming API provided by the Chain DB

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB/API.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ module Ouroboros.Consensus.Storage.LedgerDB.API (
157157

158158
import Control.Monad (forM)
159159
import Control.Monad.Class.MonadTime.SI
160+
import Control.ResourceRegistry
160161
import Data.Kind
161162
import Data.Set (Set)
162163
import Data.Word
@@ -170,7 +171,6 @@ import Ouroboros.Consensus.Storage.ChainDB.Impl.BlockCache
170171
import Ouroboros.Consensus.Storage.LedgerDB.Impl.Snapshots
171172
import Ouroboros.Consensus.Util.CallStack
172173
import Ouroboros.Consensus.Util.IOLike
173-
import Ouroboros.Consensus.Util.ResourceRegistry
174174
import Ouroboros.Network.Protocol.LocalStateQuery.Type
175175

176176
{-------------------------------------------------------------------------------

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB/Impl/Args.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ module Ouroboros.Consensus.Storage.LedgerDB.Impl.Args (
1919
, defaultArgs
2020
) where
2121

22+
import Control.ResourceRegistry
2223
import Control.Tracer
2324
import Data.Kind
2425
import Ouroboros.Consensus.Ledger.Abstract
@@ -29,7 +30,6 @@ import Ouroboros.Consensus.Storage.LedgerDB.Impl.Snapshots
2930
import qualified Ouroboros.Consensus.Storage.LedgerDB.V1.Args as V1
3031
import qualified Ouroboros.Consensus.Storage.LedgerDB.V2.Args as V2
3132
import Ouroboros.Consensus.Util.Args
32-
import Ouroboros.Consensus.Util.ResourceRegistry
3333
import System.FS.API
3434

3535
{-------------------------------------------------------------------------------

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB/Impl/Validate.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import Control.Monad.Except (ExceptT (..), MonadError (..), runExcept,
2929
runExceptT)
3030
import Control.Monad.Reader (ReaderT (..))
3131
import Control.Monad.Trans (MonadTrans (..))
32+
import Control.ResourceRegistry
3233
import Data.Kind
3334
import Data.Set (Set)
3435
import qualified Data.Set as Set
@@ -43,7 +44,6 @@ import qualified Ouroboros.Consensus.Storage.ChainDB.Impl.BlockCache as BlockCac
4344
import Ouroboros.Consensus.Storage.LedgerDB.API hiding (validate)
4445
import Ouroboros.Consensus.Util.CallStack
4546
import Ouroboros.Consensus.Util.IOLike
46-
import Ouroboros.Consensus.Util.ResourceRegistry
4747

4848
{-------------------------------------------------------------------------------
4949
Validation

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB/V1/BackingStore/Impl/LMDB.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ newLMDBBackingStore dbTracer limits liveFS@(API.LiveLMDBFS liveFS') snapFS@(API.
463463
IOLike.atomically $ IOLike.writeTVar dbOpenHandles mempty
464464
liftIO $ LMDB.closeEnvironment dbEnv
465465
Trace.traceWith dbTracer API.BSClosed
466-
pure (Closed, ())
466+
pure ((), Closed)
467467
where
468468
traceAlreadyClosed = Trace.traceWith dbTracer API.BSAlreadyClosed
469469

@@ -541,7 +541,7 @@ mkLMDBBackingStoreValueHandle db = do
541541
runCleanup cleanup
542542
IOLike.atomically $ IOLike.modifyTVar' dbOpenHandles (Map.delete vhId)
543543
Trace.traceWith tracer API.BSVHClosed
544-
pure (Closed, ())
544+
pure ((), Closed)
545545
where
546546
traceAlreadyClosed = Trace.traceWith dbTracer API.BSAlreadyClosed
547547
traceTVHAlreadyClosed = Trace.traceWith tracer API.BSVHAlreadyClosed

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB/V1/BackingStore/Impl/LMDB/Status.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ module Ouroboros.Consensus.Storage.LedgerDB.V1.BackingStore.Impl.LMDB.Status (
1818
) where
1919

2020
import Control.Exception (Exception)
21+
import Control.RAWLock (RAWLock)
22+
import qualified Control.RAWLock as RAW
2123
import Data.Functor ((<&>))
2224
import GHC.Generics (Generic)
2325
import NoThunks.Class (NoThunks)
2426
import Ouroboros.Consensus.Util.IOLike (IOLike, MonadThrow (throwIO))
25-
import Ouroboros.Consensus.Util.MonadSTM.RAWLock (RAWLock)
26-
import qualified Ouroboros.Consensus.Util.MonadSTM.RAWLock as RAW
2727

2828
{-------------------------------------------------------------------------------
2929
Status
@@ -58,7 +58,7 @@ withWriteAccess ::
5858
(IOLike m, Exception e)
5959
=> StatusLock m
6060
-> e -- ^ The exception to throw
61-
-> m (Status, a) -- ^ Action to perform, possibly updating the 'Status'
61+
-> m (a, Status) -- ^ Action to perform, possibly updating the 'Status'
6262
-> m a
6363
withWriteAccess lock exc k =
6464
RAW.withWriteAccess (getStatusLock lock) $ \case
@@ -70,12 +70,12 @@ withWriteAccess' ::
7070
IOLike m
7171
=> StatusLock m
7272
-> m a
73-
-> m (Status, a)
73+
-> m (a, Status)
7474
-> m a
7575
withWriteAccess' lock def k =
7676
RAW.withWriteAccess (getStatusLock lock) $ \case
7777
Open -> k
78-
Closed -> def <&> (Closed,)
78+
Closed -> def <&> (,Closed)
7979

8080
-- | A variant of 'RAW.withReadAccess' that throws an exception if @'Status' ==
8181
-- 'Closed'@.

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB/V1/Common.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
{-# LANGUAGE DeriveAnyClass #-}
55
{-# LANGUAGE DeriveGeneric #-}
66
{-# LANGUAGE DerivingStrategies #-}
7+
{-# LANGUAGE DerivingVia #-}
78
{-# LANGUAGE FlexibleContexts #-}
89
#if __GLASGOW_HASKELL__ <= 906
910
{-# LANGUAGE GADTs #-}
@@ -104,7 +105,7 @@ data LedgerDBEnv m l blk = LedgerDBEnv {
104105
-- - when taking a snapshot of the ledger db, we need to prevent others
105106
-- from altering the backing store at the same time, thus we acquire a
106107
-- Write lock.
107-
, ldbLock :: !(LedgerDBLock m)
108+
, ldbLock :: !(AllowThunk (LedgerDBLock m))
108109
-- | INVARIANT: this set contains only points that are in the
109110
-- VolatileDB.
110111
--

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB/V1/Forker.hs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@ module Ouroboros.Consensus.Storage.LedgerDB.V1.Forker (
1818
, acquireAtWellKnownPoint
1919
) where
2020

21+
import Control.ResourceRegistry
2122
import Control.Tracer
2223
import Data.Functor.Contravariant ((>$<))
2324
import qualified Data.Map.Strict as Map
2425
import Data.Semigroup
2526
import qualified Data.Set as Set
2627
import Data.Word
28+
import NoThunks.Class
2729
import Ouroboros.Consensus.Block
2830
import Ouroboros.Consensus.Ledger.Abstract
2931
import Ouroboros.Consensus.Ledger.SupportsProtocol
@@ -42,7 +44,6 @@ import Ouroboros.Consensus.Storage.LedgerDB.V1.DbChangelog
4244
import Ouroboros.Consensus.Storage.LedgerDB.V1.Lock
4345
import Ouroboros.Consensus.Util
4446
import Ouroboros.Consensus.Util.IOLike
45-
import Ouroboros.Consensus.Util.ResourceRegistry
4647
import Ouroboros.Network.Protocol.LocalStateQuery.Type
4748

4849
{-------------------------------------------------------------------------------
@@ -59,8 +60,8 @@ newForkerAtWellKnownPoint ::
5960
-> ResourceRegistry m
6061
-> Target (Point blk)
6162
-> m (Forker m l blk)
62-
newForkerAtWellKnownPoint h rr pt = getEnv h $ \ldbEnv -> do
63-
withReadLock (ldbLock ldbEnv) (acquireAtWellKnownPoint ldbEnv rr pt) >>= newForker h ldbEnv
63+
newForkerAtWellKnownPoint h rr pt = getEnv h $ \ldbEnv@LedgerDBEnv{ldbLock = AllowThunk lock} -> do
64+
withReadLock lock (acquireAtWellKnownPoint ldbEnv rr pt) >>= newForker h ldbEnv
6465

6566
newForkerAtPoint ::
6667
( HeaderHash l ~ HeaderHash blk
@@ -74,8 +75,8 @@ newForkerAtPoint ::
7475
-> ResourceRegistry m
7576
-> Point blk
7677
-> m (Either GetForkerError (Forker m l blk))
77-
newForkerAtPoint h rr pt = getEnv h $ \ldbEnv -> do
78-
withReadLock (ldbLock ldbEnv) (acquireAtPoint ldbEnv rr pt) >>= traverse (newForker h ldbEnv)
78+
newForkerAtPoint h rr pt = getEnv h $ \ldbEnv@LedgerDBEnv{ldbLock = AllowThunk lock} -> do
79+
withReadLock lock (acquireAtPoint ldbEnv rr pt) >>= traverse (newForker h ldbEnv)
7980

8081
newForkerAtFromTip ::
8182
( IOLike m
@@ -87,8 +88,8 @@ newForkerAtFromTip ::
8788
-> ResourceRegistry m
8889
-> Word64
8990
-> m (Either ExceededRollback (Forker m l blk))
90-
newForkerAtFromTip h rr n = getEnv h $ \ldbEnv -> do
91-
withReadLock (ldbLock ldbEnv) (acquireAtFromTip ldbEnv rr n) >>= traverse (newForker h ldbEnv)
91+
newForkerAtFromTip h rr n = getEnv h $ \ldbEnv@LedgerDBEnv{ldbLock = AllowThunk lock} -> do
92+
withReadLock lock (acquireAtFromTip ldbEnv rr n) >>= traverse (newForker h ldbEnv)
9293

9394
-- | Close all open block and header 'Follower's.
9495
closeAllForkers ::

0 commit comments

Comments
 (0)