mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
Introduce dynamic-fee pre-filtering in txpool pending retrieval to reduce allocations and downstream processing work during mining and tx propagation. What changed: - Change the `Pending` API from `Pending(enforceTips bool)` to `Pending(minTip *uint256.Int, baseFee *uint256.Int)` in txpool interfaces. - Implement pre-filtering in `legacypool.Pending` by comparing effective tip against the provided `minTip/baseFee` for non-local, non-special txs. - Update call sites to the new API: - miner work assembly (`miner/worker.go`) - tx sync (`eth/sync.go`) - pool transaction retrieval (`eth/api_backend.go`) - protocol/test interfaces (`eth/protocol.go`, `eth/helper_test.go`). Tests: - Add targeted coverage for pending filtering semantics in `core/txpool/legacypool/legacypool_test.go`, including: - minTip threshold boundary behavior - baseFee-aware effective tip filtering - local/special transaction exemption behavior - dynamic-fee boundary behavior when baseFee is nil. Impact: - Preserves existing behavior while making pending selection cheaper for downstream consumers. - Improves confidence in edge-case behavior through dedicated tests. |
||
|---|---|---|
| .. | ||
| bft | ||
| downloader | ||
| ethconfig | ||
| fetcher | ||
| filters | ||
| gasestimator | ||
| gasprice | ||
| hooks | ||
| tracers | ||
| util | ||
| api.go | ||
| api_admin.go | ||
| api_backend.go | ||
| api_debug.go | ||
| api_debug_test.go | ||
| api_miner.go | ||
| backend.go | ||
| backend_test.go | ||
| bloombits.go | ||
| handler.go | ||
| handler_test.go | ||
| helper_test.go | ||
| metrics.go | ||
| peer.go | ||
| protocol.go | ||
| protocol_test.go | ||
| state_accessor.go | ||
| sync.go | ||
| sync_test.go | ||