File tree 3 files changed +5
-2
lines changed
hydra-node/src/Hydra/Ledger/Cardano
3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import Hydra.Cardano.Api (
16
16
AsType (AsPaymentKey ),
17
17
File (.. ),
18
18
NetworkId ,
19
+ NetworkMagic (.. ),
19
20
PaymentKey ,
20
21
SigningKey ,
21
22
SocketPath ,
@@ -441,7 +442,7 @@ cliQueryProtocolParameters nodeSocket networkId = do
441
442
]
442
443
<> case networkId of
443
444
Api. Mainnet -> [" --mainnet" ]
444
- Api. Testnet magic -> [" --testnet-magic" , show magic]
445
+ Api. Testnet ( NetworkMagic magic) -> [" --testnet-magic" , show magic]
445
446
<> [ " --out-file"
446
447
, " /dev/stdout"
447
448
]
Original file line number Diff line number Diff line change @@ -310,7 +310,7 @@ withHydraNode' chainConfig workDir hydraNodeId hydraSKey hydraVKeys allNodeIds p
310
310
withSystemTempDirectory " hydra-node" $ \ dir -> do
311
311
let cardanoLedgerProtocolParametersFile = dir </> " protocol-parameters.json"
312
312
case chainConfig of
313
- Offline _ -> undefined
313
+ Offline _ -> undefined -- TODO: should write default ProtocolParameters to cardanoLedgerProtocolParametersFile
314
314
Direct DirectChainConfig {nodeSocket, networkId} -> do
315
315
-- NOTE: This implicitly tests of cardano-cli with hydra-node
316
316
protocolParameters <- cliQueryProtocolParameters nodeSocket networkId
Original file line number Diff line number Diff line change @@ -80,6 +80,8 @@ newGlobals genesisParameters = do
80
80
81
81
-- * LedgerEnv
82
82
83
+ -- | Decode protocol parameters using the 'ProtocolParameters' instance as this
84
+ -- is used by cardano-cli and matches the schema. TODO: define the schema
83
85
pparamsFromJson :: Json. Value -> Json. Parser (PParams LedgerEra )
84
86
pparamsFromJson = parseJSON
85
87
You can’t perform that action at this time.
0 commit comments