From ee04c6899a7bdcea5ecffab84b79707d6e5f59c2 Mon Sep 17 00:00:00 2001 From: Carlos LopezDeLara Date: Tue, 2 Jul 2024 05:15:41 -0600 Subject: [PATCH] Remove check for DRep metadata size Remove check for DRep metadata size --- .../src/Cardano/CLI/EraBased/Run/Governance/DRep.hs | 7 ++----- .../src/Cardano/CLI/Types/Errors/GovernanceCmdError.hs | 3 --- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/DRep.hs b/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/DRep.hs index 743d1c8561..f27af4ae91 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/DRep.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/DRep.hs @@ -164,12 +164,9 @@ runGovernanceDRepMetadataHashCmd , mOutFile } = do metadataBytes <- firstExceptT ReadFileError $ newExceptT (readByteStringFile metadataFile) - (_metadata, metadataHash) <- - firstExceptT GovernanceCmdDRepMetadataValidationError - . hoistEither - $ validateAndHashDRepMetadata metadataBytes + let (_metadata, metadataHash) = hashDRepMetadata metadataBytes firstExceptT WriteFileError . newExceptT . writeByteStringOutput mOutFile . serialiseToRawBytesHex - $ metadataHash + $ metadataHash \ No newline at end of file diff --git a/cardano-cli/src/Cardano/CLI/Types/Errors/GovernanceCmdError.hs b/cardano-cli/src/Cardano/CLI/Types/Errors/GovernanceCmdError.hs index 6fa63a24ce..f12e984b4a 100644 --- a/cardano-cli/src/Cardano/CLI/Types/Errors/GovernanceCmdError.hs +++ b/cardano-cli/src/Cardano/CLI/Types/Errors/GovernanceCmdError.hs @@ -50,7 +50,6 @@ data GovernanceCmdError | GovernanceCmdDecoderError !DecoderError | GovernanceCmdVerifyPollError !GovernancePollError | GovernanceCmdWriteFileError !(FileError ()) - | GovernanceCmdDRepMetadataValidationError !DRepMetadataValidationError -- Legacy - remove me after cardano-cli transitions to new era based structure | GovernanceCmdMIRCertNotSupportedInConway | GovernanceCmdGenesisDelegationNotSupportedInConway @@ -108,8 +107,6 @@ instance Error GovernanceCmdError where pretty $ renderGovernancePollError pollError GovernanceCmdWriteFileError fileError -> "Cannot write file: " <> prettyError fileError - GovernanceCmdDRepMetadataValidationError e -> - "DRep metadata validation error: " <> prettyError e GovernanceCmdMIRCertNotSupportedInConway -> "MIR certificates are not supported in Conway era onwards." GovernanceCmdGenesisDelegationNotSupportedInConway ->