From f17df6db91c5dd504dcc746d3734ae612fbd9453 Mon Sep 17 00:00:00 2001 From: kourin Date: Fri, 18 Jul 2025 19:36:10 +0900 Subject: [PATCH] core/txpool/blobpool: remove unused `txValidationFn` from BlobPool (#32237) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR removes the now‑unused `txValidationFn` field from BlobPool. It became obsolete after a PR  https://github.com/ethereum/go-ethereum/pull/31202 was merged. Resolves https://github.com/ethereum/go-ethereum/issues/32236 --- core/txpool/blobpool/blobpool.go | 5 ----- core/txpool/blobpool/blobpool_test.go | 6 ------ 2 files changed, 11 deletions(-) diff --git a/core/txpool/blobpool/blobpool.go b/core/txpool/blobpool/blobpool.go index dbf65033f8..40429853f7 100644 --- a/core/txpool/blobpool/blobpool.go +++ b/core/txpool/blobpool/blobpool.go @@ -326,10 +326,6 @@ type BlobPool struct { discoverFeed event.Feed // Event feed to send out new tx events on pool discovery (reorg excluded) insertFeed event.Feed // Event feed to send out new tx events on pool inclusion (reorg included) - // txValidationFn defaults to txpool.ValidateTransaction, but can be - // overridden for testing purposes. - txValidationFn txpool.ValidationFunction - lock sync.RWMutex // Mutex protecting the pool during reorg handling } @@ -348,7 +344,6 @@ func New(config Config, chain BlockChain, hasPendingAuth func(common.Address) bo lookup: newLookup(), index: make(map[common.Address][]*blobTxMeta), spent: make(map[common.Address]*uint256.Int), - txValidationFn: txpool.ValidateTransaction, } } diff --git a/core/txpool/blobpool/blobpool_test.go b/core/txpool/blobpool/blobpool_test.go index 6a66c03c62..ec1de6ef5d 100644 --- a/core/txpool/blobpool/blobpool_test.go +++ b/core/txpool/blobpool/blobpool_test.go @@ -1724,12 +1724,6 @@ func benchmarkPoolPending(b *testing.B, datacap uint64) { // Make the pool not use disk (just drop everything). This test never reads // back the data, it just iterates over the pool in-memory items pool.store = &fakeBilly{pool.store, 0} - // Avoid validation - verifying all blob proofs take significant time - // when the capacity is large. The purpose of this bench is to measure assembling - // the lazies, not the kzg verifications. - pool.txValidationFn = func(tx *types.Transaction, head *types.Header, signer types.Signer, opts *txpool.ValidationOptions) error { - return nil // accept all - } // Fill the pool up with one random transaction from each account with the // same price and everything to maximize the worst case scenario for i := 0; i < int(capacity); i++ {