Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit 856f344

Browse files
committed
fixes after rebase conflicts
1 parent f010c4b commit 856f344

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

src/exec/DB.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,5 +128,5 @@ withDB dbOptions dbTracer indexTracer rr nodeConfig extLedgerState k = do
128128
}
129129
bracket (ChainDB.openDB chainDBArgs) ChainDB.closeDB $ \cdb ->
130130
Sqlite.withIndexAuto epochSlots indexTracer (indexFilePath dbOptions) $ \idx -> do
131-
_ <- forkLinked rr $ ResourceRegistry.with $ \rr' -> Index.trackChainDB rr' idx cdb
131+
_ <- forkLinked rr $ ResourceRegistry.with $ \rr' -> Index.trackChainDB rr' idx cdb (protocolSecurityParam nodeConfig)
132132
k idx cdb

src/lib/Ouroboros/Byron/Proxy/Block.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ module Ouroboros.Byron.Proxy.Block
2424
) where
2525

2626
import qualified Codec.CBOR.Write as CBOR (toStrictByteString)
27-
import qualified Data.ByteString.Lazy as Lazy
2827
import Data.Word (Word64)
2928

3029
import qualified Pos.Chain.Block as CSL (HeaderHash)

src/lib/Ouroboros/Byron/Proxy/Index/ChainDB.hs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,13 @@ trackReader idx reader = do
6767
-- ChainDB. If none are in it, then the entire index will be rebuild (rollback
6868
-- to Origin).
6969
trackChainDB
70-
:: forall blk t .
70+
:: forall blk void .
7171
ResourceRegistry IO
7272
-> Index IO (Header blk)
7373
-> ChainDB IO blk
7474
-> SecurityParam
75-
-> IO t
76-
-> IO t
77-
trackChainDB rr idx cdb k act = bracket acquireReader releaseReader $ \rdr -> do
75+
-> IO void
76+
trackChainDB rr idx cdb k = bracket acquireReader releaseReader $ \rdr -> do
7877
checkpoints <- Index.streamFromTip idx checkpointsFold
7978
mPoint <- ChainDB.readerForward rdr checkpoints
8079
case mPoint of
@@ -90,10 +89,7 @@ trackChainDB rr idx cdb k act = bracket acquireReader releaseReader $ \rdr -> do
9089
-- First, block until the index is caught up to the tip ...
9190
trackReader idx rdr
9291
-- ... then attempt to stay in sync.
93-
outcome <- race (trackReaderBlocking idx rdr) act
94-
case outcome of
95-
Left impossible -> impossible
96-
Right t -> pure t
92+
trackReaderBlocking idx rdr
9793
where
9894
acquireReader :: IO (Reader IO blk (Header blk))
9995
acquireReader = ChainDB.newHeaderReader cdb rr

0 commit comments

Comments
 (0)