Skip to content

Commit

Permalink
tx-generator: remove support for legacy JSON format
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcFontaine committed Jan 13, 2022
1 parent 19457d2 commit 5d373cc
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 290 deletions.
47 changes: 0 additions & 47 deletions bench/script/test-full-auto.ljson

This file was deleted.

54 changes: 0 additions & 54 deletions bench/script/test-plutus-to-file.ljson

This file was deleted.

55 changes: 0 additions & 55 deletions bench/script/test-plutus.ljson

This file was deleted.

19 changes: 2 additions & 17 deletions bench/tx-generator/src/Cardano/Benchmarking/Command.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ import Options.Applicative as Opt

import Ouroboros.Network.NodeToClient (withIOManager)

import Cardano.Benchmarking.Script (runScript, parseScriptFileAeson, parseScriptFileLegacy)
import Cardano.Benchmarking.Script (runScript, parseScriptFileAeson)

data Command
= Json !FilePath
| LegacyJson !FilePath

runCommand :: IO ()
runCommand = withIOManager $ \iocp -> do
Expand All @@ -32,9 +31,6 @@ runCommand = withIOManager $ \iocp -> do
Json file -> do
script <- parseScriptFileAeson file
runScript script iocp >>= handleError
LegacyJson file -> do
script <- parseScriptFileLegacy file
runScript script iocp >>= handleError
where
handleError :: Show a => Either a b -> IO ()
handleError = \case
Expand All @@ -43,10 +39,7 @@ runCommand = withIOManager $ \iocp -> do

commandParser :: Parser Command
commandParser
= subparser
( jsonCmd
<> legacyJsonCmd
)
= subparser jsonCmd
where
jsonCmd = command "json"
(Json <$> info (strArgument (metavar "FILEPATH"))
Expand All @@ -55,11 +48,3 @@ commandParser
<> header "tx-generator - run a generic benchmarking script"
)
)

legacyJsonCmd = command "legacy-json"
(LegacyJson <$> info (strArgument (metavar "FILEPATH"))
( progDesc "tx-generator run JsonScript (legacy format)"
<> fullDesc
<> header "tx-generator - run a generic benchmarking script (legacy JSON format)"
)
)
2 changes: 0 additions & 2 deletions bench/tx-generator/src/Cardano/Benchmarking/Script.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ module Cardano.Benchmarking.Script
( Script
, runScript
, parseScriptFileAeson
, parseScriptFileLegacy
)
where

Expand All @@ -20,7 +19,6 @@ import Cardano.Node.Configuration.Logging (shutdownLoggingLayer)
import Cardano.Benchmarking.Tracer (createDebugTracers)
import Cardano.Benchmarking.Script.Action
import Cardano.Benchmarking.Script.Aeson (parseScriptFileAeson)
import Cardano.Benchmarking.Script.AesonLegacy (parseScriptFileLegacy)
import Cardano.Benchmarking.Script.Core (initGlobalWallet, setProtocolParameters)
import Cardano.Benchmarking.Script.Env
import Cardano.Benchmarking.Script.Store
Expand Down
114 changes: 0 additions & 114 deletions bench/tx-generator/src/Cardano/Benchmarking/Script/AesonLegacy.hs

This file was deleted.

1 change: 0 additions & 1 deletion bench/tx-generator/tx-generator.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ library
Cardano.Benchmarking.Script
Cardano.Benchmarking.Script.Action
Cardano.Benchmarking.Script.Aeson
Cardano.Benchmarking.Script.AesonLegacy
Cardano.Benchmarking.Script.Core
Cardano.Benchmarking.Script.Env
Cardano.Benchmarking.Script.Example
Expand Down

0 comments on commit 5d373cc

Please sign in to comment.