@@ -1645,8 +1645,8 @@ func TestUnderpricing(t *testing.T) {
1645
1645
t .Fatalf ("failed to add well priced transaction: %v" , err )
1646
1646
}
1647
1647
// Ensure that replacing a pending transaction with a future transaction fails
1648
- if err := pool .addRemoteSync (pricedTransaction (5 , 100000 , big .NewInt (6 ), keys [1 ])); err != txpool . ErrFutureReplacePending {
1649
- t .Fatalf ("adding future replace transaction error mismatch: have %v, want %v" , err , txpool . ErrFutureReplacePending )
1648
+ if err := pool .addRemoteSync (pricedTransaction (5 , 100000 , big .NewInt (6 ), keys [1 ])); err != ErrFutureReplacePending {
1649
+ t .Fatalf ("adding future replace transaction error mismatch: have %v, want %v" , err , ErrFutureReplacePending )
1650
1650
}
1651
1651
pending , queued = pool .Stats ()
1652
1652
if pending != 4 {
@@ -2248,12 +2248,12 @@ func TestSetCodeTransactions(t *testing.T) {
2248
2248
if err := pool .addRemoteSync (pricedTransaction (0 , 100000 , big .NewInt (1 ), keyA )); err != nil {
2249
2249
t .Fatalf ("%s: failed to add remote transaction: %v" , name , err )
2250
2250
}
2251
- if err := pool .addRemoteSync (pricedTransaction (1 , 100000 , big .NewInt (1 ), keyA )); ! errors .Is (err , txpool . ErrAccountLimitExceeded ) {
2252
- t .Fatalf ("%s: error mismatch: want %v, have %v" , name , txpool . ErrAccountLimitExceeded , err )
2251
+ if err := pool .addRemoteSync (pricedTransaction (1 , 100000 , big .NewInt (1 ), keyA )); ! errors .Is (err , ErrInflightTxLimitReached ) {
2252
+ t .Fatalf ("%s: error mismatch: want %v, have %v" , name , ErrInflightTxLimitReached , err )
2253
2253
}
2254
2254
// Also check gapped transaction.
2255
- if err := pool .addRemoteSync (pricedTransaction (2 , 100000 , big .NewInt (1 ), keyA )); ! errors .Is (err , txpool . ErrAccountLimitExceeded ) {
2256
- t .Fatalf ("%s: error mismatch: want %v, have %v" , name , txpool . ErrAccountLimitExceeded , err )
2255
+ if err := pool .addRemoteSync (pricedTransaction (2 , 100000 , big .NewInt (1 ), keyA )); ! errors .Is (err , ErrInflightTxLimitReached ) {
2256
+ t .Fatalf ("%s: error mismatch: want %v, have %v" , name , ErrInflightTxLimitReached , err )
2257
2257
}
2258
2258
// Replace by fee.
2259
2259
if err := pool .addRemoteSync (pricedTransaction (0 , 100000 , big .NewInt (10 ), keyA )); err != nil {
@@ -2287,8 +2287,8 @@ func TestSetCodeTransactions(t *testing.T) {
2287
2287
t .Fatalf ("%s: failed to add with pending delegatio: %v" , name , err )
2288
2288
}
2289
2289
// Also check gapped transaction is rejected.
2290
- if err := pool .addRemoteSync (pricedTransaction (1 , 100000 , big .NewInt (1 ), keyC )); ! errors .Is (err , txpool . ErrAccountLimitExceeded ) {
2291
- t .Fatalf ("%s: error mismatch: want %v, have %v" , name , txpool . ErrAccountLimitExceeded , err )
2290
+ if err := pool .addRemoteSync (pricedTransaction (1 , 100000 , big .NewInt (1 ), keyC )); ! errors .Is (err , ErrInflightTxLimitReached ) {
2291
+ t .Fatalf ("%s: error mismatch: want %v, have %v" , name , ErrInflightTxLimitReached , err )
2292
2292
}
2293
2293
},
2294
2294
},
@@ -2363,7 +2363,7 @@ func TestSetCodeTransactions(t *testing.T) {
2363
2363
if err := pool .addRemoteSync (pricedTransaction (0 , 100000 , big .NewInt (1000 ), keyC )); err != nil {
2364
2364
t .Fatalf ("%s: failed to added single pooled for account with pending delegation: %v" , name , err )
2365
2365
}
2366
- if err , want := pool .addRemoteSync (pricedTransaction (1 , 100000 , big .NewInt (1000 ), keyC )), txpool . ErrAccountLimitExceeded ; ! errors .Is (err , want ) {
2366
+ if err , want := pool .addRemoteSync (pricedTransaction (1 , 100000 , big .NewInt (1000 ), keyC )), ErrInflightTxLimitReached ; ! errors .Is (err , want ) {
2367
2367
t .Fatalf ("%s: error mismatch: want %v, have %v" , name , want , err )
2368
2368
}
2369
2369
},
@@ -2376,7 +2376,7 @@ func TestSetCodeTransactions(t *testing.T) {
2376
2376
if err := pool .addRemoteSync (pricedTransaction (0 , 100000 , big .NewInt (1000 ), keyC )); err != nil {
2377
2377
t .Fatalf ("%s: failed to add with remote setcode transaction: %v" , name , err )
2378
2378
}
2379
- if err , want := pool .addRemoteSync (setCodeTx (0 , keyA , []unsignedAuth {{1 , keyC }})), txpool . ErrAuthorityReserved ; ! errors .Is (err , want ) {
2379
+ if err , want := pool .addRemoteSync (setCodeTx (0 , keyA , []unsignedAuth {{1 , keyC }})), ErrAuthorityReserved ; ! errors .Is (err , want ) {
2380
2380
t .Fatalf ("%s: error mismatch: want %v, have %v" , name , want , err )
2381
2381
}
2382
2382
},
@@ -2440,8 +2440,8 @@ func TestSetCodeTransactionsReorg(t *testing.T) {
2440
2440
t .Fatalf ("failed to add with remote setcode transaction: %v" , err )
2441
2441
}
2442
2442
// Try to add a transactions in
2443
- if err := pool .addRemoteSync (pricedTransaction (2 , 100000 , big .NewInt (1000 ), keyA )); ! errors .Is (err , txpool . ErrAccountLimitExceeded ) {
2444
- t .Fatalf ("unexpected error %v, expecting %v" , err , txpool . ErrAccountLimitExceeded )
2443
+ if err := pool .addRemoteSync (pricedTransaction (2 , 100000 , big .NewInt (1000 ), keyA )); ! errors .Is (err , ErrInflightTxLimitReached ) {
2444
+ t .Fatalf ("unexpected error %v, expecting %v" , err , ErrInflightTxLimitReached )
2445
2445
}
2446
2446
// Simulate the chain moving
2447
2447
blockchain .statedb .SetNonce (addrA , 2 , tracing .NonceChangeAuthorization )
0 commit comments