@@ -43,7 +43,6 @@ import (
43
43
"github.com/ethereum/go-ethereum/rlp"
44
44
"github.com/holiman/billy"
45
45
"github.com/holiman/uint256"
46
- "github.com/stretchr/testify/assert"
47
46
)
48
47
49
48
var (
@@ -1155,9 +1154,6 @@ func TestBlobCountLimit(t *testing.T) {
1155
1154
1156
1155
addr1 = crypto .PubkeyToAddress (key1 .PublicKey )
1157
1156
addr2 = crypto .PubkeyToAddress (key2 .PublicKey )
1158
-
1159
- tx1 = makeMultiBlobTx (0 , 1 , 1000 , 100 , 7 , key1 )
1160
- tx2 = makeMultiBlobTx (0 , 1 , 800 , 70 , 8 , key2 )
1161
1157
)
1162
1158
1163
1159
statedb , _ := state .New (types .EmptyRootHash , state .NewDatabaseForTesting ())
@@ -1190,11 +1186,19 @@ func TestBlobCountLimit(t *testing.T) {
1190
1186
t .Fatalf ("failed to create blob pool: %v" , err )
1191
1187
}
1192
1188
1189
+ var (
1190
+ tx1 = makeMultiBlobTx (0 , 1 , 1000 , 100 , 7 , key1 )
1191
+ tx2 = makeMultiBlobTx (0 , 1 , 800 , 70 , 8 , key2 )
1192
+ )
1193
+
1193
1194
// Attempt to add transactions.
1194
1195
errs := pool .Add ([]* types.Transaction {tx1 , tx2 }, true )
1195
- assert .Equal (t , 2 , len (errs ))
1196
- assert .NoError (t , errs [0 ])
1197
- assert .EqualError (t , errs [1 ], "transaction blob limit exceeded: blob count 8, limit 7" )
1196
+ if errs [0 ] != nil {
1197
+ t .Fatalf ("expected tx with 7 blobs to succeed" )
1198
+ }
1199
+ if ! errors .Is (errs [1 ], txpool .ErrTxBlobLimitExceeded ) {
1200
+ t .Fatalf ("expected tx with 8 blobs to fail, got: %v" , errs [1 ])
1201
+ }
1198
1202
1199
1203
verifyPoolInternals (t , pool )
1200
1204
pool .Close ()
0 commit comments