Skip to content

Commit

Permalink
Generate protocolUpdateUTxOCostPerByte only if it is supported in era.
Browse files Browse the repository at this point in the history
  • Loading branch information
newhoggy committed Jun 8, 2023
1 parent 701372a commit e33efc7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion cardano-api/gen/Test/Gen/Cardano/Api/Typed.hs
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,6 @@ genProtocolParametersUpdate era = do

pure ProtocolParametersUpdate{..}


genUpdateProposal :: CardanoEra era -> Gen UpdateProposal
genUpdateProposal era =
UpdateProposal
Expand Down
10 changes: 5 additions & 5 deletions cardano-api/internal/Cardano/Api/TxBody.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1718,7 +1718,7 @@ data TxBodyContent build era =
txCertificates :: TxCertificates build era,
txUpdateProposal :: TxUpdateProposal era,
txMintValue :: TxMintValue build era,
txScriptValidity :: FeatureValue (TxScriptValidityFeature era) ScriptValidity
txScriptValidity :: FeatureValue TxScriptValidityFeature era ScriptValidity
}
deriving (Eq, Show)

Expand Down Expand Up @@ -1803,7 +1803,7 @@ setTxUpdateProposal v txBodyContent = txBodyContent { txUpdateProposal = v }
setTxMintValue :: TxMintValue build era -> TxBodyContent build era -> TxBodyContent build era
setTxMintValue v txBodyContent = txBodyContent { txMintValue = v }

setTxScriptValidity :: FeatureValue (TxScriptValidityFeature era) ScriptValidity -> TxBodyContent build era -> TxBodyContent build era
setTxScriptValidity :: FeatureValue TxScriptValidityFeature era ScriptValidity -> TxBodyContent build era -> TxBodyContent build era
setTxScriptValidity v txBodyContent = txBodyContent { txScriptValidity = v }

-- ----------------------------------------------------------------------------
Expand Down Expand Up @@ -1839,7 +1839,7 @@ data TxBody era where
-- auxiliary data.
-> Maybe (L.TxAuxData (ShelleyLedgerEra era))

-> FeatureValue (TxScriptValidityFeature era) ScriptValidity -- ^ Mark script as expected to pass or fail validation
-> FeatureValue TxScriptValidityFeature era ScriptValidity -- ^ Mark script as expected to pass or fail validation

-> TxBody era
-- The 'ShelleyBasedEra' GADT tells us what era we are in.
Expand Down Expand Up @@ -2071,7 +2071,7 @@ serialiseShelleyBasedTxBody
-> [Ledger.Script ledgerera]
-> TxBodyScriptData era
-> Maybe (L.TxAuxData ledgerera)
-> FeatureValue (TxScriptValidityFeature era) ScriptValidity -- ^ Mark script as expected to pass or fail validation
-> FeatureValue TxScriptValidityFeature era ScriptValidity -- ^ Mark script as expected to pass or fail validation
-> ByteString
serialiseShelleyBasedTxBody era txbody txscripts
TxBodyNoScriptData txmetadata scriptValidity =
Expand Down Expand Up @@ -2676,7 +2676,7 @@ getTxBodyContent (ShelleyTxBody era body _scripts scriptdata mAux scriptValidity

fromLedgerTxBody
:: ShelleyBasedEra era
-> FeatureValue (TxScriptValidityFeature era) ScriptValidity
-> FeatureValue TxScriptValidityFeature era ScriptValidity
-> Ledger.TxBody (ShelleyLedgerEra era)
-> TxBodyScriptData era
-> Maybe (L.TxAuxData (ShelleyLedgerEra era))
Expand Down

0 comments on commit e33efc7

Please sign in to comment.