File tree 6 files changed +10
-11
lines changed
alonzo/impl/testlib/Test/Cardano/Ledger/Alonzo
src/Cardano/Ledger/Babbage/Rules
testlib/Test/Cardano/Ledger/Babbage/Imp
src/Cardano/Ledger/Conway
testlib/Test/Cardano/Ledger/Conway
6 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -287,9 +287,9 @@ fixupDatums tx = impAnn "fixupDatums" $ do
287
287
getData txOut =
288
288
let sh = txOutScriptHash txOut
289
289
in case txOut ^. datumTxOutF of
290
- DatumHash _dh -> case Map. lookup sh (scriptTestContexts @ era ) of
291
- Just x -> pure . Just $ spendDatum x
292
- Nothing -> do
290
+ DatumHash dh -> case Map. lookup sh (scriptTestContexts @ era ) of
291
+ Just x | hashData @ era (spendDatum x) == dh -> pure . Just $ spendDatum x
292
+ _ -> do
293
293
logText $
294
294
" Script not found in `scriptTestContexts`:\n "
295
295
<> T. pack (show sh)
Original file line number Diff line number Diff line change @@ -232,7 +232,9 @@ disjointRefInputs ::
232
232
Test (BabbageUtxoPredFailure era )
233
233
disjointRefInputs pp inputs refInputs =
234
234
when
235
- (pvMajor (pp ^. ppProtocolVersionL) == natVersion @ 10 )
235
+ ( pvMajor (pp ^. ppProtocolVersionL) > eraProtVerHigh @ BabbageEra
236
+ && pvMajor (pp ^. ppProtocolVersionL) < natVersion @ 11
237
+ )
236
238
(failureOnNonEmpty common BabbageNonDisjointRefInputs )
237
239
where
238
240
common = inputs `Set.intersection` refInputs
Original file line number Diff line number Diff line change @@ -49,11 +49,11 @@ spec = describe "UTXO" $ do
49
49
txOut =
50
50
mkBasicTxOut
51
51
( mkAddr
52
- (ScriptHashObj @ 'Payment $ hashPlutusScript (inputsOverlapsWithRefInputs SPlutusV2 ))
52
+ (hashPlutusScript (inputsOverlapsWithRefInputs SPlutusV2 ))
53
53
StakeRefNull
54
54
)
55
55
(inject $ Coin 1_000_000 )
56
- & datumTxOutL .~ ( Datum . dataToBinaryData . Data . PV1. I $ 0 )
56
+ & datumTxOutL .~ Datum ( dataToBinaryData . Data $ PV1. I 0 )
57
57
tx <-
58
58
submitTx $
59
59
mkBasicTx mkBasicTxBody
Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ data ConwayContextError era
166
166
| VotingProceduresFieldNotSupported ! (VotingProcedures era )
167
167
| ProposalProceduresFieldNotSupported ! (OSet. OSet (ProposalProcedure era ))
168
168
| TreasuryDonationFieldNotSupported ! Coin
169
- | ReferenceInputsNotDisjointFromInputs ! (Set. Set TxIn )
169
+ | ReferenceInputsNotDisjointFromInputs ! (NonEmpty TxIn )
170
170
deriving (Generic )
171
171
172
172
deriving instance
Original file line number Diff line number Diff line change @@ -90,7 +90,6 @@ spec ::
90
90
, ToExpr (Event (EraRule " ENACT" era ))
91
91
, Eq (Event (EraRule " ENACT" era ))
92
92
, Typeable (Event (EraRule " ENACT" era ))
93
- , ContextError era ~ ConwayContextError era
94
93
) =>
95
94
Spec
96
95
spec = do
@@ -126,7 +125,6 @@ conwaySpec ::
126
125
, ToExpr (Event (EraRule " ENACT" era ))
127
126
, Eq (Event (EraRule " ENACT" era ))
128
127
, Typeable (Event (EraRule " ENACT" era ))
129
- , ContextError era ~ ConwayContextError era
130
128
) =>
131
129
SpecWith (ImpInit (LedgerSpec era ))
132
130
conwaySpec = do
Original file line number Diff line number Diff line change @@ -58,7 +58,6 @@ spec ::
58
58
( ConwayEraImp era
59
59
, InjectRuleFailure " LEDGER" BabbageUtxoPredFailure era
60
60
, InjectRuleFailure " LEDGER" AlonzoUtxosPredFailure era
61
- , ContextError era ~ ConwayContextError era
62
61
) =>
63
62
SpecWith (ImpInit (LedgerSpec era ))
64
63
spec =
@@ -110,7 +109,7 @@ spec =
110
109
(tx txIn)
111
110
[ injectFailure $
112
111
CollectErrors
113
- [ BadTranslation
112
+ [ inject
114
113
( ReferenceInputsNotDisjointFromInputs
115
114
(Set. singleton txIn)
116
115
)
You can’t perform that action at this time.
0 commit comments