Skip to content

Commit 8e556fe

Browse files
authored
test: remove unnecessary type argument (#1239)
Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
1 parent d1dd62e commit 8e556fe

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

ledger/alonzo/alonzo_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func TestAlonzoTransactionOutputToPlutusDataCoinOnly(t *testing.T) {
8787
func TestAlonzoTransactionOutputToPlutusDataCoinAssets(t *testing.T) {
8888
testAddr := "addr_test1vqg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zygxrcya6"
8989
var testAmount uint64 = 123_456_789
90-
testAssets := common.NewMultiAsset[common.MultiAssetTypeOutput](
90+
testAssets := common.NewMultiAsset(
9191
map[common.Blake2b224]map[cbor.ByteString]common.MultiAssetTypeOutput{
9292
common.NewBlake2b224(test.DecodeHexString("29a8fb8318718bd756124f0c144f56d4b4579dc5edf2dd42d669ac61")): {
9393
cbor.NewByteString(test.DecodeHexString("6675726e697368613239686e")): 123456,
@@ -282,7 +282,7 @@ func TestAlonzoRedeemersIter(t *testing.T) {
282282
func TestAlonzoTransactionOutputString(t *testing.T) {
283283
addrStr := "addr1qytna5k2fq9ler0fuk45j7zfwv7t2zwhp777nvdjqqfr5tz8ztpwnk8zq5ngetcz5k5mckgkajnygtsra9aej2h3ek5seupmvd"
284284
addr, _ := common.NewAddress(addrStr)
285-
ma := common.NewMultiAsset[common.MultiAssetTypeOutput](
285+
ma := common.NewMultiAsset(
286286
map[common.Blake2b224]map[cbor.ByteString]uint64{
287287
common.NewBlake2b224(make([]byte, 28)): {
288288
cbor.NewByteString([]byte("t")): 2,

ledger/alonzo/block_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ func TestAlonzoBlock_CborRoundTrip_UsingCborEncode(t *testing.T) {
5858
err,
5959
)
6060
}
61-
if encoded == nil || len(encoded) == 0 {
62-
t.Fatal("Custom encoded CBOR from AlonzoBlock is nil or empty")
61+
if len(encoded) == 0 {
62+
t.Fatal("Custom encoded CBOR from AlonzoBlock is empty")
6363
}
6464

6565
// Ensure the original and re-encoded CBOR bytes are identical

ledger/alonzo/rules_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ func TestUtxoValidateOutputTooBigUtxo(t *testing.T) {
750750
cbor.NewByteString(tmpAssetName): 1,
751751
}
752752
}
753-
tmpBadMultiAsset := common.NewMultiAsset[common.MultiAssetTypeOutput](
753+
tmpBadMultiAsset := common.NewMultiAsset(
754754
tmpBadAssets,
755755
)
756756
var testOutputValueBad = mary.MaryTransactionOutputValue{
@@ -996,7 +996,7 @@ func TestUtxoValidateInsufficientCollateral(t *testing.T) {
996996
t.Run(
997997
"insufficient collateral",
998998
func(t *testing.T) {
999-
testTx.Body.TxCollateral = cbor.NewSetType[shelley.ShelleyTransactionInput](
999+
testTx.Body.TxCollateral = cbor.NewSetType(
10001000
[]shelley.ShelleyTransactionInput{
10011001
shelley.NewShelleyTransactionInput(testInputTxId, 0),
10021002
},
@@ -1029,7 +1029,7 @@ func TestUtxoValidateInsufficientCollateral(t *testing.T) {
10291029
t.Run(
10301030
"sufficient collateral",
10311031
func(t *testing.T) {
1032-
testTx.Body.TxCollateral = cbor.NewSetType[shelley.ShelleyTransactionInput](
1032+
testTx.Body.TxCollateral = cbor.NewSetType(
10331033
[]shelley.ShelleyTransactionInput{
10341034
shelley.NewShelleyTransactionInput(testInputTxId, 0),
10351035
shelley.NewShelleyTransactionInput(testInputTxId, 1),
@@ -1064,7 +1064,7 @@ func TestUtxoValidateCollateralContainsNonAda(t *testing.T) {
10641064
},
10651065
},
10661066
}
1067-
tmpMultiAsset := common.NewMultiAsset[common.MultiAssetTypeOutput](
1067+
tmpMultiAsset := common.NewMultiAsset(
10681068
map[common.Blake2b224]map[cbor.ByteString]uint64{},
10691069
)
10701070
testLedgerState := test.MockLedgerState{
@@ -1092,7 +1092,7 @@ func TestUtxoValidateCollateralContainsNonAda(t *testing.T) {
10921092
t.Run(
10931093
"coin and assets",
10941094
func(t *testing.T) {
1095-
testTx.Body.TxCollateral = cbor.NewSetType[shelley.ShelleyTransactionInput](
1095+
testTx.Body.TxCollateral = cbor.NewSetType(
10961096
[]shelley.ShelleyTransactionInput{
10971097
shelley.NewShelleyTransactionInput(testInputTxId, 0),
10981098
shelley.NewShelleyTransactionInput(testInputTxId, 1),
@@ -1126,7 +1126,7 @@ func TestUtxoValidateCollateralContainsNonAda(t *testing.T) {
11261126
t.Run(
11271127
"coin only",
11281128
func(t *testing.T) {
1129-
testTx.Body.TxCollateral = cbor.NewSetType[shelley.ShelleyTransactionInput](
1129+
testTx.Body.TxCollateral = cbor.NewSetType(
11301130
[]shelley.ShelleyTransactionInput{
11311131
shelley.NewShelleyTransactionInput(testInputTxId, 0),
11321132
},
@@ -1203,7 +1203,7 @@ func TestUtxoValidateNoCollateralInputs(t *testing.T) {
12031203
t.Run(
12041204
"collateral",
12051205
func(t *testing.T) {
1206-
testTx.Body.TxCollateral = cbor.NewSetType[shelley.ShelleyTransactionInput](
1206+
testTx.Body.TxCollateral = cbor.NewSetType(
12071207
[]shelley.ShelleyTransactionInput{
12081208
shelley.NewShelleyTransactionInput(testInputTxId, 0),
12091209
},

0 commit comments

Comments
 (0)