Skip to content

Commit f17df6d

Browse files
authored
core/txpool/blobpool: remove unused txValidationFn from BlobPool (#32237)
This PR removes the now‑unused `txValidationFn` field from BlobPool. It became obsolete after a PR  #31202 was merged. Resolves #32236
1 parent b4b4068 commit f17df6d

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

core/txpool/blobpool/blobpool.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -326,10 +326,6 @@ type BlobPool struct {
326326
discoverFeed event.Feed // Event feed to send out new tx events on pool discovery (reorg excluded)
327327
insertFeed event.Feed // Event feed to send out new tx events on pool inclusion (reorg included)
328328

329-
// txValidationFn defaults to txpool.ValidateTransaction, but can be
330-
// overridden for testing purposes.
331-
txValidationFn txpool.ValidationFunction
332-
333329
lock sync.RWMutex // Mutex protecting the pool during reorg handling
334330
}
335331

@@ -348,7 +344,6 @@ func New(config Config, chain BlockChain, hasPendingAuth func(common.Address) bo
348344
lookup: newLookup(),
349345
index: make(map[common.Address][]*blobTxMeta),
350346
spent: make(map[common.Address]*uint256.Int),
351-
txValidationFn: txpool.ValidateTransaction,
352347
}
353348
}
354349

core/txpool/blobpool/blobpool_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1724,12 +1724,6 @@ func benchmarkPoolPending(b *testing.B, datacap uint64) {
17241724
// Make the pool not use disk (just drop everything). This test never reads
17251725
// back the data, it just iterates over the pool in-memory items
17261726
pool.store = &fakeBilly{pool.store, 0}
1727-
// Avoid validation - verifying all blob proofs take significant time
1728-
// when the capacity is large. The purpose of this bench is to measure assembling
1729-
// the lazies, not the kzg verifications.
1730-
pool.txValidationFn = func(tx *types.Transaction, head *types.Header, signer types.Signer, opts *txpool.ValidationOptions) error {
1731-
return nil // accept all
1732-
}
17331727
// Fill the pool up with one random transaction from each account with the
17341728
// same price and everything to maximize the worst case scenario
17351729
for i := 0; i < int(capacity); i++ {

0 commit comments

Comments
 (0)