Skip to content

Commit 377b534

Browse files
committed
Do not close resources when interrupting initialization
1 parent df2449e commit 377b534

File tree

2 files changed

+0
-3
lines changed
  • ouroboros-consensus
    • src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB
    • test/storage-test/Test/Ouroboros/Storage/LedgerDB

2 files changed

+0
-3
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ mkInitDb args getBlock snapManager res = do
9090
res
9191
, abortLedgerDbInit = \ls -> do
9292
closeLedgerSeq ls
93-
releaseResources (Proxy @blk) res
9493
, initReapplyBlock = \a b c -> do
9594
(x, y) <- reapplyThenPush lgrRegistry a b c
9695
x

ouroboros-consensus/test/storage-test/Test/Ouroboros/Storage/LedgerDB/StateMachine.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,6 @@ instance RunModel Model (StateT Environment IO) where
611611
Environment _ _ chainDb mkArgs fs _ cleanup rr <- get
612612
(ldb, testInternals, getNumOpenHandles) <- lift $ do
613613
let args = mkArgs secParam salt
614-
-- TODO after a drop and restore we restart the db but the session has been closed below where I wrote blahblahblah
615614
openLedgerDB (argFlavorArgs args) chainDb (argLedgerDbCfg args) fs rr
616615
put (Environment ldb testInternals chainDb mkArgs fs getNumOpenHandles cleanup rr)
617616
pure $ pure ()
@@ -648,7 +647,6 @@ instance RunModel Model (StateT Environment IO) where
648647
Environment _ testInternals chainDb _ _ _ _ _ <- get
649648
lift $ do
650649
atomically $ modifyTVar (dbChain chainDb) (drop (fromIntegral n))
651-
-- blahblahblah
652650
closeLedgerDB testInternals
653651
perform state (Init secParam salt) lk
654652
perform _ OpenAndCloseForker _ = do

0 commit comments

Comments
 (0)