go-ethereum/eth
Daniel Liu d4a6f43ef2
refactor(core/txpool): migrate tx subscription to SubscribeTransactions #28243 (#2125)
* refactor(txpool): remove wrapper type #27841

Partial backport of ethereum/go-ethereum PR #27841, limited to txpool wrapper removal.

- Migrate txpool interfaces/call sites from `*txpool.Transaction` to `*types.Transaction`
- Update eth/miner/contracts paths and related tests accordingly
- No intended behavior change

Blob sidecar validation/handling changes from upstream are not included here.

* refactor(core/txpool): migrate tx subscription to SubscribeTransactions #28243

Replace the old SubscribeNewTxsEvent-style plumbing with the new
SubscribeTransactions(ch, reorgs) interface across txpool, eth protocol
manager, API backend, miner worker, and test helpers.

Key changes:
- Extend txpool/subpool tx subscription interface with a reorgs flag
- Route eth tx announcement path to reorgs=false (new tx announcements only)
- Route API/miner subscriptions to reorgs=true
- Move subscription-scope cleanup to TxPool.Close()
- Add Gas field to LazyTransaction in legacy pending view

Note:
LegacyPool currently cannot strictly separate newly seen and resurrected txs,
so the reorgs flag is accepted for API compatibility and future blob-subpool
integration.
2026-03-10 18:44:38 +05:30
..
bft all: fix goimports (#1560) 2025-09-24 07:51:10 +08:00
downloader refactor(crypto): vendor in golang.org/x/crypto/sha3 #33323 (#2046) 2026-02-28 17:23:57 +04:00
ethconfig rpc: add a rpc.rangelimit flag #33163 (#1957) 2026-01-29 11:50:58 +05:30
fetcher refactor(all): cleanup the APIs for initializing genesis #25473 #26747 (#2017) 2026-02-07 00:18:39 +05:30
filters refactor(all): move genesis initialization to blockchain #25523 (#2018) 2026-02-10 16:56:34 +05:30
gasestimator refactor(all): rework EVM constructor #30745 (#2065) 2026-02-17 14:35:18 +05:30
gasprice refactor(all): move genesis initialization to blockchain #25523 (#2018) 2026-02-10 16:56:34 +05:30
hooks fix(all): fix typo foudation (#2063) 2026-02-28 18:00:55 +04:00
tracers fix(eth): add index to callTracer log #33629 (#2044) 2026-02-28 17:01:13 +04:00
util all: replace Div/Mul with Rsh/Lsh if possible #29911 (#1966) 2026-01-29 11:31:58 +05:30
api.go cmd/utils, eth: rename ApiBackend to APIBackend (#1955) 2026-01-16 17:27:48 +05:30
api_admin.go eth: split api.go into namespace based files #27263 (#1601) 2025-10-30 21:27:14 +05:30
api_backend.go refactor(core/txpool): migrate tx subscription to SubscribeTransactions #28243 (#2125) 2026-03-10 18:44:38 +05:30
api_debug.go perf: improve state reader with error handling and committed flag #27428 (#1166) 2026-02-03 20:55:53 +05:30
api_debug_test.go perf: improve state reader with error handling and committed flag #27428 (#1166) 2026-02-03 20:55:53 +05:30
api_miner.go core/txpool: make tx validation reusable across packages/pools #27429 (#1873) 2025-12-23 16:28:30 +05:30
backend.go refactor(all): move genesis initialization to blockchain #25523 (#2018) 2026-02-10 16:56:34 +05:30
backend_test.go Move consensus hooks to its own package 2021-10-10 16:04:32 +11:00
bloombits.go core, eth, params: make indexer configurable (#17188) 2025-03-10 15:41:53 +08:00
handler.go refactor(core/txpool): migrate tx subscription to SubscribeTransactions #28243 (#2125) 2026-03-10 18:44:38 +05:30
handler_test.go refactor(all): move genesis initialization to blockchain #25523 (#2018) 2026-02-10 16:56:34 +05:30
helper_test.go refactor(core/txpool): migrate tx subscription to SubscribeTransactions #28243 (#2125) 2026-03-10 18:44:38 +05:30
metrics.go metrics, cmd/XDC: change init-process of metrics (#30814) 2024-12-13 14:00:14 +08:00
peer.go all: use github.com/deckarep/golang-set/v2 (generic set) (#26159) 2025-01-24 16:54:11 +08:00
protocol.go refactor(core/txpool): migrate tx subscription to SubscribeTransactions #28243 (#2125) 2026-03-10 18:44:38 +05:30
protocol_test.go refactor(core/txpool): migrate tx subscription to SubscribeTransactions #28243 (#2125) 2026-03-10 18:44:38 +05:30
state_accessor.go refactor(core): remove unnecessary parameters #30776 (#2068) 2026-02-20 13:51:30 +05:30
sync.go refactor(core/txpool): migrate tx subscription to SubscribeTransactions #28243 (#2125) 2026-03-10 18:44:38 +05:30
sync_test.go all: change chain head markers from block to header #26777 (#1846) 2025-12-16 07:36:51 +04:00