@@ -1446,7 +1446,12 @@ func (p *BlobPool) drop() {
1446
1446
//
1447
1447
// The transactions can also be pre-filtered by the dynamic fee components to
1448
1448
// reduce allocations and load on downstream subsystems.
1449
- func (p * BlobPool ) Pending (minTip * uint256.Int , baseFee * uint256.Int , blobFee * uint256.Int ) map [common.Address ][]* txpool.LazyTransaction {
1449
+ func (p * BlobPool ) Pending (filter txpool.PendingFilter ) map [common.Address ][]* txpool.LazyTransaction {
1450
+ // If only plain transactions are requested, this pool is unsuitable as it
1451
+ // contains none, don't even bother.
1452
+ if filter .OnlyPlainTxs {
1453
+ return nil
1454
+ }
1450
1455
// Track the amount of time waiting to retrieve the list of pending blob txs
1451
1456
// from the pool and the amount of time actually spent on assembling the data.
1452
1457
// The latter will be pretty much moot, but we've kept it to have symmetric
@@ -1466,20 +1471,20 @@ func (p *BlobPool) Pending(minTip *uint256.Int, baseFee *uint256.Int, blobFee *u
1466
1471
lazies := make ([]* txpool.LazyTransaction , 0 , len (txs ))
1467
1472
for _ , tx := range txs {
1468
1473
// If transaction filtering was requested, discard badly priced ones
1469
- if minTip != nil && baseFee != nil {
1470
- if tx .execFeeCap .Lt (baseFee ) {
1474
+ if filter . MinTip != nil && filter . BaseFee != nil {
1475
+ if tx .execFeeCap .Lt (filter . BaseFee ) {
1471
1476
break // basefee too low, cannot be included, discard rest of txs from the account
1472
1477
}
1473
- tip := new (uint256.Int ).Sub (tx .execFeeCap , baseFee )
1478
+ tip := new (uint256.Int ).Sub (tx .execFeeCap , filter . BaseFee )
1474
1479
if tip .Gt (tx .execTipCap ) {
1475
1480
tip = tx .execTipCap
1476
1481
}
1477
- if tip .Lt (minTip ) {
1482
+ if tip .Lt (filter . MinTip ) {
1478
1483
break // allowed or remaining tip too low, cannot be included, discard rest of txs from the account
1479
1484
}
1480
1485
}
1481
- if blobFee != nil {
1482
- if tx .blobFeeCap .Lt (blobFee ) {
1486
+ if filter . BlobFee != nil {
1487
+ if tx .blobFeeCap .Lt (filter . BlobFee ) {
1483
1488
break // blobfee too low, cannot be included, discard rest of txs from the account
1484
1489
}
1485
1490
}
0 commit comments