From 708f68283a89989aa1d9aeeaeb4718aa6118aea3 Mon Sep 17 00:00:00 2001 From: Daniel Firth Date: Sun, 8 Dec 2024 17:23:23 +0000 Subject: [PATCH] Remove unused functions generateCardanoKey, withObject --- hydra-cluster/src/CardanoNode.hs | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/hydra-cluster/src/CardanoNode.hs b/hydra-cluster/src/CardanoNode.hs index 73b4789da76..b975d63378a 100644 --- a/hydra-cluster/src/CardanoNode.hs +++ b/hydra-cluster/src/CardanoNode.hs @@ -15,18 +15,12 @@ import Data.Fixed (Centi) import Data.Text qualified as Text import Data.Time.Clock.POSIX (posixSecondsToUTCTime, utcTimeToPOSIXSeconds) import Hydra.Cardano.Api ( - AsType (AsPaymentKey), File (..), GenesisParameters (..), NetworkId, NetworkMagic (..), - PaymentKey, - SigningKey, SocketPath, - VerificationKey, - generateSigningKey, getProgress, - getVerificationKey, ) import Hydra.Cardano.Api qualified as Api import Hydra.Cluster.Fixture (KnownNetwork (..), toNetworkId) @@ -464,11 +458,6 @@ mkTopology peers = Aeson.object ["addr" .= ("127.0.0.1" :: Text), "port" .= port, "valency" .= (1 :: Int)] -generateCardanoKey :: IO (VerificationKey PaymentKey, SigningKey PaymentKey) -generateCardanoKey = do - sk <- generateSigningKey AsPaymentKey - pure (getVerificationKey sk, sk) - data ProcessHasExited = ProcessHasExited Text ExitCode deriving stock (Show) @@ -503,13 +492,6 @@ cliQueryProtocolParameters nodeSocket networkId = do -- Helpers -- --- | Do something with an a JSON object. Fails if the given JSON value isn't an --- object. -withObject :: (Aeson.Object -> Aeson.Object) -> Aeson.Value -> Aeson.Value -withObject fn = \case - Aeson.Object m -> Aeson.Object (fn m) - x -> x - unsafeDecodeJson :: FromJSON a => ByteString -> IO a unsafeDecodeJson = either fail pure . Aeson.eitherDecodeStrict