This repository was archived by the owner on Aug 18, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +7
-16
lines changed
lib/Ouroboros/Byron/Proxy Expand file tree Collapse file tree 4 files changed +7
-16
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,7 @@ import qualified Ouroboros.Consensus.Ledger.Byron as Byron
2727import Ouroboros.Consensus.Ledger.Byron.Config (ByronConfig )
2828import Ouroboros.Consensus.Ledger.Extended (ExtLedgerState )
2929import Ouroboros.Consensus.Protocol (NodeConfig )
30- import Ouroboros.Consensus.Protocol.Abstract (SecurityParam (.. ),
31- protocolSecurityParam )
30+ import Ouroboros.Consensus.Protocol.Abstract (protocolSecurityParam )
3231import Ouroboros.Consensus.Util.ResourceRegistry (ResourceRegistry )
3332import qualified Ouroboros.Consensus.Util.ResourceRegistry as ResourceRegistry
3433import Ouroboros.Storage.ChainDB.API (ChainDB )
@@ -130,7 +129,5 @@ withDB dbOptions dbTracer indexTracer rr nodeConfig extLedgerState k = do
130129 }
131130 bracket (ChainDB. openDB chainDBArgs) ChainDB. closeDB $ \ cdb ->
132131 Sqlite. withIndexAuto epochSlots indexTracer (indexFilePath dbOptions) $ \ idx -> do
133- -- TBD do we need withRegistry in there or not?
134- -- _ <- ResourceRegistry.forkLinkedThread rr $ ResourceRegistry.withRegistry $ \rr' -> Index.trackChainDB rr' idx cdb
135- _ <- ResourceRegistry. forkLinkedThread rr $ Index. trackChainDB rr idx cdb
132+ _ <- ResourceRegistry. forkLinkedThread rr $ Index. trackChainDB rr idx cdb (protocolSecurityParam nodeConfig)
136133 k idx cdb
Original file line number Diff line number Diff line change @@ -55,7 +55,6 @@ import qualified Pos.Infra.Network.CLI as CSL (NetworkConfigOpts (..),
5555 launchStaticConfigMonitoring ,
5656 listenNetworkAddressOption )
5757import Pos.Infra.Network.Types (NetworkConfig (.. ))
58- import qualified Pos.Infra.Network.Policy as Policy
5958import qualified Pos.Launcher.Configuration as CSL (Configuration (.. ),
6059 ConfigurationOptions (.. ))
6160import qualified Pos.Client.CLI.Options as CSL (configurationOptionsParser )
@@ -387,7 +386,7 @@ runByron tracer byronOptions genesisConfig blockConfig updateConfig nodeConfig e
387386 blockConfig
388387 updateConfig
389388 nodeConfig
390- networkConfig'
389+ networkConfig
391390 64 -- Batch size.
392391 trace
393392 genesisBlock = CSL. genesisBlock0 (CSL. configProtocolMagic genesisConfig)
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ module Ouroboros.Byron.Proxy.Block
2424 ) where
2525
2626import qualified Codec.CBOR.Write as CBOR (toStrictByteString )
27- import qualified Data.ByteString.Lazy as Lazy
2827import Data.Word (Word64 )
2928
3029import 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
6767-- ChainDB. If none are in it, then the entire index will be rebuild (rollback
6868-- to Origin).
6969trackChainDB
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
You can’t perform that action at this time.
0 commit comments