@@ -998,9 +998,12 @@ func TestUtxoValidateInsufficientCollateral(t *testing.T) {
998
998
t .Run (
999
999
"insufficient collateral" ,
1000
1000
func (t * testing.T ) {
1001
- testTx .Body .TxCollateral = []shelley.ShelleyTransactionInput {
1002
- shelley .NewShelleyTransactionInput (testInputTxId , 0 ),
1003
- }
1001
+ testTx .Body .TxCollateral = cbor .NewSetType [shelley.ShelleyTransactionInput ](
1002
+ []shelley.ShelleyTransactionInput {
1003
+ shelley .NewShelleyTransactionInput (testInputTxId , 0 ),
1004
+ },
1005
+ false ,
1006
+ )
1004
1007
err := babbage .UtxoValidateInsufficientCollateral (
1005
1008
testTx ,
1006
1009
testSlot ,
@@ -1028,10 +1031,13 @@ func TestUtxoValidateInsufficientCollateral(t *testing.T) {
1028
1031
t .Run (
1029
1032
"sufficient collateral" ,
1030
1033
func (t * testing.T ) {
1031
- testTx .Body .TxCollateral = []shelley.ShelleyTransactionInput {
1032
- shelley .NewShelleyTransactionInput (testInputTxId , 0 ),
1033
- shelley .NewShelleyTransactionInput (testInputTxId , 1 ),
1034
- }
1034
+ testTx .Body .TxCollateral = cbor .NewSetType [shelley.ShelleyTransactionInput ](
1035
+ []shelley.ShelleyTransactionInput {
1036
+ shelley .NewShelleyTransactionInput (testInputTxId , 0 ),
1037
+ shelley .NewShelleyTransactionInput (testInputTxId , 1 ),
1038
+ },
1039
+ false ,
1040
+ )
1035
1041
err := babbage .UtxoValidateInsufficientCollateral (
1036
1042
testTx ,
1037
1043
testSlot ,
@@ -1110,10 +1116,13 @@ func TestUtxoValidateCollateralContainsNonAda(t *testing.T) {
1110
1116
t .Run (
1111
1117
"coin and assets" ,
1112
1118
func (t * testing.T ) {
1113
- testTx .Body .TxCollateral = []shelley.ShelleyTransactionInput {
1114
- shelley .NewShelleyTransactionInput (testInputTxId , 0 ),
1115
- shelley .NewShelleyTransactionInput (testInputTxId , 1 ),
1116
- }
1119
+ testTx .Body .TxCollateral = cbor .NewSetType [shelley.ShelleyTransactionInput ](
1120
+ []shelley.ShelleyTransactionInput {
1121
+ shelley .NewShelleyTransactionInput (testInputTxId , 0 ),
1122
+ shelley .NewShelleyTransactionInput (testInputTxId , 1 ),
1123
+ },
1124
+ false ,
1125
+ )
1117
1126
err := babbage .UtxoValidateCollateralContainsNonAda (
1118
1127
testTx ,
1119
1128
testSlot ,
@@ -1141,9 +1150,12 @@ func TestUtxoValidateCollateralContainsNonAda(t *testing.T) {
1141
1150
t .Run (
1142
1151
"coin only" ,
1143
1152
func (t * testing.T ) {
1144
- testTx .Body .TxCollateral = []shelley.ShelleyTransactionInput {
1145
- shelley .NewShelleyTransactionInput (testInputTxId , 0 ),
1146
- }
1153
+ testTx .Body .TxCollateral = cbor .NewSetType [shelley.ShelleyTransactionInput ](
1154
+ []shelley.ShelleyTransactionInput {
1155
+ shelley .NewShelleyTransactionInput (testInputTxId , 0 ),
1156
+ },
1157
+ false ,
1158
+ )
1147
1159
err := babbage .UtxoValidateCollateralContainsNonAda (
1148
1160
testTx ,
1149
1161
testSlot ,
@@ -1162,10 +1174,13 @@ func TestUtxoValidateCollateralContainsNonAda(t *testing.T) {
1162
1174
t .Run (
1163
1175
"coin and assets with return" ,
1164
1176
func (t * testing.T ) {
1165
- testTx .Body .TxCollateral = []shelley.ShelleyTransactionInput {
1166
- shelley .NewShelleyTransactionInput (testInputTxId , 0 ),
1167
- shelley .NewShelleyTransactionInput (testInputTxId , 1 ),
1168
- }
1177
+ testTx .Body .TxCollateral = cbor .NewSetType [shelley.ShelleyTransactionInput ](
1178
+ []shelley.ShelleyTransactionInput {
1179
+ shelley .NewShelleyTransactionInput (testInputTxId , 0 ),
1180
+ shelley .NewShelleyTransactionInput (testInputTxId , 1 ),
1181
+ },
1182
+ false ,
1183
+ )
1169
1184
testTx .Body .TxCollateralReturn = & babbage.BabbageTransactionOutput {
1170
1185
OutputAmount : mary.MaryTransactionOutputValue {
1171
1186
Amount : testCollateralAmount ,
@@ -1190,9 +1205,12 @@ func TestUtxoValidateCollateralContainsNonAda(t *testing.T) {
1190
1205
t .Run (
1191
1206
"coin and zero assets with return" ,
1192
1207
func (t * testing.T ) {
1193
- testTx .Body .TxCollateral = []shelley.ShelleyTransactionInput {
1194
- shelley .NewShelleyTransactionInput (testInputTxId , 2 ),
1195
- }
1208
+ testTx .Body .TxCollateral = cbor .NewSetType [shelley.ShelleyTransactionInput ](
1209
+ []shelley.ShelleyTransactionInput {
1210
+ shelley .NewShelleyTransactionInput (testInputTxId , 2 ),
1211
+ },
1212
+ false ,
1213
+ )
1196
1214
testTx .Body .TxCollateralReturn = & babbage.BabbageTransactionOutput {
1197
1215
OutputAmount : mary.MaryTransactionOutputValue {
1198
1216
Amount : testCollateralAmount ,
@@ -1269,9 +1287,12 @@ func TestUtxoValidateNoCollateralInputs(t *testing.T) {
1269
1287
t .Run (
1270
1288
"collateral" ,
1271
1289
func (t * testing.T ) {
1272
- testTx .Body .TxCollateral = []shelley.ShelleyTransactionInput {
1273
- shelley .NewShelleyTransactionInput (testInputTxId , 0 ),
1274
- }
1290
+ testTx .Body .TxCollateral = cbor .NewSetType [shelley.ShelleyTransactionInput ](
1291
+ []shelley.ShelleyTransactionInput {
1292
+ shelley .NewShelleyTransactionInput (testInputTxId , 0 ),
1293
+ },
1294
+ false ,
1295
+ )
1275
1296
err := babbage .UtxoValidateNoCollateralInputs (
1276
1297
testTx ,
1277
1298
testSlot ,
@@ -1374,9 +1395,12 @@ func TestUtxoValidateCollateralEqBalance(t *testing.T) {
1374
1395
testTx := & babbage.BabbageTransaction {
1375
1396
Body : babbage.BabbageTransactionBody {
1376
1397
TxTotalCollateral : testTotalCollateral ,
1377
- TxCollateral : []shelley.ShelleyTransactionInput {
1378
- shelley .NewShelleyTransactionInput (testInputTxId , 0 ),
1379
- },
1398
+ TxCollateral : cbor .NewSetType [shelley.ShelleyTransactionInput ](
1399
+ []shelley.ShelleyTransactionInput {
1400
+ shelley .NewShelleyTransactionInput (testInputTxId , 0 ),
1401
+ },
1402
+ false ,
1403
+ ),
1380
1404
},
1381
1405
}
1382
1406
testLedgerState := test.MockLedgerState {
@@ -1492,10 +1516,13 @@ func TestUtxoValidateTooManyCollateralInputs(t *testing.T) {
1492
1516
t .Run (
1493
1517
"too many collateral inputs" ,
1494
1518
func (t * testing.T ) {
1495
- testTx .Body .TxCollateral = []shelley.ShelleyTransactionInput {
1496
- shelley .NewShelleyTransactionInput (testInputTxId , 0 ),
1497
- shelley .NewShelleyTransactionInput (testInputTxId , 1 ),
1498
- }
1519
+ testTx .Body .TxCollateral = cbor .NewSetType [shelley.ShelleyTransactionInput ](
1520
+ []shelley.ShelleyTransactionInput {
1521
+ shelley .NewShelleyTransactionInput (testInputTxId , 0 ),
1522
+ shelley .NewShelleyTransactionInput (testInputTxId , 1 ),
1523
+ },
1524
+ false ,
1525
+ )
1499
1526
err := babbage .UtxoValidateTooManyCollateralInputs (
1500
1527
testTx ,
1501
1528
testSlot ,
@@ -1523,9 +1550,12 @@ func TestUtxoValidateTooManyCollateralInputs(t *testing.T) {
1523
1550
t .Run (
1524
1551
"single collateral input" ,
1525
1552
func (t * testing.T ) {
1526
- testTx .Body .TxCollateral = []shelley.ShelleyTransactionInput {
1527
- shelley .NewShelleyTransactionInput (testInputTxId , 0 ),
1528
- }
1553
+ testTx .Body .TxCollateral = cbor .NewSetType [shelley.ShelleyTransactionInput ](
1554
+ []shelley.ShelleyTransactionInput {
1555
+ shelley .NewShelleyTransactionInput (testInputTxId , 0 ),
1556
+ },
1557
+ false ,
1558
+ )
1529
1559
err := babbage .UtxoValidateTooManyCollateralInputs (
1530
1560
testTx ,
1531
1561
testSlot ,
0 commit comments