This repository was archived by the owner on Aug 18, 2020. It is now read-only.
File tree 3 files changed +5
-10
lines changed
lib/Ouroboros/Byron/Proxy 3 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -128,5 +128,5 @@ withDB dbOptions dbTracer indexTracer rr nodeConfig extLedgerState k = do
128
128
}
129
129
bracket (ChainDB. openDB chainDBArgs) ChainDB. closeDB $ \ cdb ->
130
130
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)
132
132
k idx cdb
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ module Ouroboros.Byron.Proxy.Block
24
24
) where
25
25
26
26
import qualified Codec.CBOR.Write as CBOR (toStrictByteString )
27
- import qualified Data.ByteString.Lazy as Lazy
28
27
import Data.Word (Word64 )
29
28
30
29
import qualified Pos.Chain.Block as CSL (HeaderHash )
Original file line number Diff line number Diff line change @@ -67,14 +67,13 @@ trackReader idx reader = do
67
67
-- ChainDB. If none are in it, then the entire index will be rebuild (rollback
68
68
-- to Origin).
69
69
trackChainDB
70
- :: forall blk t .
70
+ :: forall blk void .
71
71
ResourceRegistry IO
72
72
-> Index IO (Header blk )
73
73
-> ChainDB IO blk
74
74
-> 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
78
77
checkpoints <- Index. streamFromTip idx checkpointsFold
79
78
mPoint <- ChainDB. readerForward rdr checkpoints
80
79
case mPoint of
@@ -90,10 +89,7 @@ trackChainDB rr idx cdb k act = bracket acquireReader releaseReader $ \rdr -> do
90
89
-- First, block until the index is caught up to the tip ...
91
90
trackReader idx rdr
92
91
-- ... 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
97
93
where
98
94
acquireReader :: IO (Reader IO blk (Header blk ))
99
95
acquireReader = ChainDB. newHeaderReader cdb rr
You can’t perform that action at this time.
0 commit comments