Skip to content

Commit 42c53d5

Browse files
authored
Merge pull request IntersectMBO#5506 from input-output-hk/nadia.chambers/no-tx-gen-lens-01
bench: Remove dependency on microlens
2 parents d9dd473 + 9f26250 commit 42c53d5

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

bench/tx-generator/src/Cardano/TxGenerator/Setup/NodeConfig.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ module Cardano.TxGenerator.Setup.NodeConfig
88
(module Cardano.TxGenerator.Setup.NodeConfig)
99
where
1010

11+
import Control.Applicative (Const (Const), getConst)
1112
import Control.Monad.Trans.Except (runExceptT)
1213
import Data.Bifunctor (first)
1314
import Data.Monoid
14-
import Lens.Micro ((^.))
1515

1616
import qualified Ouroboros.Consensus.Cardano as Consensus
1717

1818
import Cardano.Api (BlockType (..), ProtocolInfoArgs (..))
19-
import qualified Cardano.Ledger.Api.Transition as Ledger
19+
import qualified Cardano.Ledger.Api.Transition as Ledger (tcShelleyGenesisL)
2020
import Cardano.Node.Configuration.POM
2121
import Cardano.Node.Handlers.Shutdown (ShutdownConfig (..))
2222
import Cardano.Node.Protocol.Cardano
@@ -32,7 +32,7 @@ import Cardano.TxGenerator.Types
3232
-- as this guarantees proper error handling when trying to create a non-Cardano protocol.
3333
getGenesis :: SomeConsensusProtocol -> ShelleyGenesis
3434
getGenesis (SomeConsensusProtocol CardanoBlockType proto)
35-
= transCfg ^. Ledger.tcShelleyGenesisL
35+
= getConst $ Ledger.tcShelleyGenesisL Const transCfg
3636
where
3737
ProtocolInfoArgsCardano Consensus.CardanoProtocolParams
3838
{ Consensus.ledgerTransitionConfig = transCfg

bench/tx-generator/tx-generator.cabal

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ library
120120
, generic-monoid
121121
, ghc-prim
122122
, io-classes
123-
, microlens
124123
, mtl
125124
, network
126125
, network-mux

0 commit comments

Comments
 (0)