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

Commit 63b8f0c

Browse files
committed
fixes after rebase conflicts
1 parent c1a9d6a commit 63b8f0c

File tree

3 files changed

+6
-13
lines changed

3 files changed

+6
-13
lines changed

src/exec/DB.hs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,5 @@ withDB dbOptions dbTracer indexTracer rr nodeConfig extLedgerState k = do
129129
}
130130
bracket (ChainDB.openDB chainDBArgs) ChainDB.closeDB $ \cdb ->
131131
Sqlite.withIndexAuto epochSlots indexTracer (indexFilePath dbOptions) $ \idx -> do
132-
-- TBD do we need withRegistry in there or not?
133-
-- _ <- ResourceRegistry.forkLinkedThread rr $ ResourceRegistry.withRegistry $ \rr' -> Index.trackChainDB rr' idx cdb
134-
_ <- ResourceRegistry.forkLinkedThread rr $ Index.trackChainDB rr idx cdb
132+
_ <- ResourceRegistry.forkLinkedThread rr $ Index.trackChainDB rr idx cdb (protocolSecurityParam nodeConfig)
135133
k idx cdb

src/exec/Main.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ import qualified Pos.Infra.Network.CLI as CSL (NetworkConfigOpts (..),
5555
launchStaticConfigMonitoring,
5656
listenNetworkAddressOption)
5757
import Pos.Infra.Network.Types (NetworkConfig (..))
58-
import qualified Pos.Infra.Network.Policy as Policy
5958
import qualified Pos.Launcher.Configuration as CSL (Configuration (..),
6059
ConfigurationOptions (..))
6160
import qualified Pos.Client.CLI.Options as CSL (configurationOptionsParser)
@@ -388,7 +387,7 @@ runByron tracer byronOptions genesisConfig blockConfig updateConfig nodeConfig e
388387
blockConfig
389388
updateConfig
390389
nodeConfig
391-
networkConfig'
390+
networkConfig
392391
64 -- Batch size.
393392
trace
394393
genesisBlock = CSL.genesisBlock0 (CSL.configProtocolMagic genesisConfig)

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

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

0 commit comments

Comments
 (0)