Skip to content

Commit

Permalink
Remove unused functions generateCardanoKey, withObject
Browse files Browse the repository at this point in the history
  • Loading branch information
locallycompact committed Dec 8, 2024
1 parent 38c804c commit 708f682
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions hydra-cluster/src/CardanoNode.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 708f682

Please sign in to comment.