Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADP-3229] Create dummy value for currentProtocolParametersInRecentEras in bench… #4247

Merged
merged 1 commit into from
Nov 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/wallet/bench/api-bench.hs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ import Cardano.Wallet.DB.Layer
)
import Cardano.Wallet.DummyTarget.Primitive.Types
( dummyNetworkLayer
, dummyNodeProtocolParameters
, dummyProtocolParameters
, dummySlottingParameters
, dummyTimeInterpreter
Expand Down Expand Up @@ -175,6 +176,7 @@ import Say
)

import qualified Cardano.Api as Cardano
import qualified Cardano.Api as C
import qualified Cardano.Wallet as W
import qualified Cardano.Wallet.DB as DB
import qualified Cardano.Wallet.DB.Layer as DB
Expand All @@ -186,6 +188,8 @@ import qualified Data.Aeson as Aeson
import qualified Data.ByteString.Char8 as B8
import qualified Data.Map.Strict as Map
import qualified Data.Text as T
import qualified Internal.Cardano.Write.ProtocolParameters as Write
import qualified Internal.Cardano.Write.Tx as Write
import qualified System.Environment as Sys
import qualified System.Exit as Sys

Expand Down Expand Up @@ -533,6 +537,12 @@ mockNetworkLayer = dummyNetworkLayer
{ timeInterpreter = hoistTimeInterpreter liftIO mockTimeInterpreter
, currentSlottingParameters = pure dummySlottingParameters
, currentProtocolParameters = pure dummyProtocolParameters
, currentProtocolParametersInRecentEras = pure
$ Write.InRecentEraBabbage . Write.ProtocolParameters $
either (error . show) id $
C.toLedgerPParams
C.ShelleyBasedEraBabbage
dummyNodeProtocolParameters
, currentNodeEra = pure $ Cardano.anyCardanoEra Cardano.BabbageEra
, currentNodeTip = pure BlockHeader
{ slotNo = SlotNo 123456789
Expand Down
Loading