@@ -1290,77 +1290,6 @@ func TestUtxoValidateExUnitsTooBigUtxo(t *testing.T) {
1290
1290
)
1291
1291
}
1292
1292
1293
- func TestUtxoValidateDisjointRefInputs (t * testing.T ) {
1294
- testInputTxId := "d228b482a1aae768e4a796380f49e021d9c21f70d3c12cb186b188dedfc0ee22"
1295
- testTx := & babbage.BabbageTransaction {
1296
- Body : babbage.BabbageTransactionBody {},
1297
- }
1298
- testLedgerState := testLedgerState {}
1299
- testSlot := uint64 (0 )
1300
- testProtocolParams := & babbage.BabbageProtocolParameters {}
1301
- // Non-disjoint ref inputs
1302
- t .Run (
1303
- "non-disjoint ref inputs" ,
1304
- func (t * testing.T ) {
1305
- testTx .Body .TxInputs = shelley .NewShelleyTransactionInputSet (
1306
- []shelley.ShelleyTransactionInput {
1307
- shelley .NewShelleyTransactionInput (testInputTxId , 0 ),
1308
- },
1309
- )
1310
- testTx .Body .TxReferenceInputs = []shelley.ShelleyTransactionInput {
1311
- shelley .NewShelleyTransactionInput (testInputTxId , 0 ),
1312
- }
1313
- err := babbage .UtxoValidateDisjointRefInputs (
1314
- testTx ,
1315
- testSlot ,
1316
- testLedgerState ,
1317
- testProtocolParams ,
1318
- )
1319
- if err == nil {
1320
- t .Errorf (
1321
- "UtxoValidateDisjointRefInputs should fail when inputs and ref inputs are duplicated" ,
1322
- )
1323
- return
1324
- }
1325
- testErrType := babbage.NonDisjointRefInputsError {}
1326
- assert .IsType (
1327
- t ,
1328
- testErrType ,
1329
- err ,
1330
- "did not get expected error type: got %T, wanted %T" ,
1331
- err ,
1332
- testErrType ,
1333
- )
1334
- },
1335
- )
1336
- // Disjoint ref inputs
1337
- t .Run (
1338
- "disjoint ref inputs" ,
1339
- func (t * testing.T ) {
1340
- testTx .Body .TxInputs = shelley .NewShelleyTransactionInputSet (
1341
- []shelley.ShelleyTransactionInput {
1342
- shelley .NewShelleyTransactionInput (testInputTxId , 0 ),
1343
- },
1344
- )
1345
- testTx .Body .TxReferenceInputs = []shelley.ShelleyTransactionInput {
1346
- shelley .NewShelleyTransactionInput (testInputTxId , 1 ),
1347
- }
1348
- err := babbage .UtxoValidateDisjointRefInputs (
1349
- testTx ,
1350
- testSlot ,
1351
- testLedgerState ,
1352
- testProtocolParams ,
1353
- )
1354
- if err != nil {
1355
- t .Errorf (
1356
- "UtxoValidateDisjointRefInputs should succeed when inputs and ref inputs are not duplicated\n got error: %v" ,
1357
- err ,
1358
- )
1359
- }
1360
- },
1361
- )
1362
- }
1363
-
1364
1293
func TestUtxoValidateCollateralEqBalance (t * testing.T ) {
1365
1294
testInputTxId := "d228b482a1aae768e4a796380f49e021d9c21f70d3c12cb186b188dedfc0ee22"
1366
1295
var testInputAmount uint64 = 20_000_000
0 commit comments