Skip to content

Commit 530c7f0

Browse files
committed
Fix Db-analyser incorrect handling of resource registries
If the same registry was given to the validation logic, when committing a forker weird things would happen. This creates a new registry just for that step
1 parent 9e9419c commit 530c7f0

File tree

1 file changed

+2
-2
lines changed
  • ouroboros-consensus-cardano/src/unstable-cardano-tools/Cardano/Tools/DBAnalyser

1 file changed

+2
-2
lines changed

ouroboros-consensus-cardano/src/unstable-cardano-tools/Cardano/Tools/DBAnalyser/Analysis.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,11 +436,11 @@ storeLedgerStateAt slotNo ledgerAppMode env = do
436436
FromLedgerState initLedgerDB internal = startFrom
437437

438438
process :: () -> blk -> IO (NextStep, ())
439-
process _ blk = do
439+
process _ blk = withRegistry $ \reg -> do
440440
let ledgerCfg = ExtLedgerCfg cfg
441441
oldLedger <- IOLike.atomically $ LedgerDB.getVolatileTip initLedgerDB
442442
frk <-
443-
LedgerDB.getForkerAtTarget initLedgerDB registry VolatileTip >>= \case
443+
LedgerDB.getForkerAtTarget initLedgerDB reg VolatileTip >>= \case
444444
Left{} -> error "Unreachable, volatile tip MUST be in the LedgerDB"
445445
Right f -> pure f
446446
tbs <- LedgerDB.forkerReadTables frk (getBlockKeySets blk)

0 commit comments

Comments
 (0)